带附件的 Drupal 6 Mimemail
任何人都可以帮助我使用 drupal mimemail 附件我正在使用下面提到的代码在特定电子邮件上发送附件文件,但不知何故它不起作用,kinldy 帮助我提前感谢
$body = "test body with attachments";
$subject = "My test message";
$attachments[]=array(
'filepath' => file_directory_path().'/document.pdf',
'filename' => 'wonderful.pdf',
'filemime' => 'application/pdf',
);
mimemail("[email protected]", "[email protected]", $subject, $body, NULL, array(), NULL, $attachments,'');
Can anyone help me with drupal mimemail for attachment i am using below mentioned code to send attachment file on specific email, but somehow its not working, kinldy help me thanks in advance
$body = "test body with attachments";
$subject = "My test message";
$attachments[]=array(
'filepath' => file_directory_path().'/document.pdf',
'filename' => 'wonderful.pdf',
'filemime' => 'application/pdf',
);
mimemail("[email protected]", "[email protected]", $subject, $body, NULL, array(), NULL, $attachments,'');
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在做一些非常相似的事情。我的代码基本上是:
来自我的 hook_mail 模块回调。请参阅http://api.drupal。 org/api/drupal/developer--hooks--core.php/function/hook_mail/6
您确定您已完成以下操作:
我的工作得很好。我还安装了 SMTP 模块,并且它可以与选择作为电子邮件引擎的任一模块一起使用。
I'm doing something very similar. My code is basically:
from within my hook_mail module callback. See http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail/6
Are you sure that you've done the following:
Mine is working just fine. I have SMTP module installed as well, and it works with either module selected as the Email Engine.