有人能帮我使用下面提到的代码在特定的电子邮件上发送附件文件的drupal吗?但是不知怎么它不起作用,请提前感谢。
$body = "test body with attachments";
$subject = "My test message";
$attachments[]=array(
'filepath' => file_directory_path().'/document.pdf',
'filename' => 'wonderful.pdf',
'filemime' => 'application/pdf',
);
mimemail("xxxxx@gmail.com", "xxxxxx2@gmail.com", $subject, $body, NULL, array(), NULL, $attachments,'');发布于 2011-05-17 01:55:34
我也在做类似的事。我的代码基本上是:
$message['attachments'][] = array(
'filepath' => $zipfilepath,
'filename' => 'my-attachment.zip',
'filemime' => 'application/zip',
);从我的hook_mail模块回调。请参阅http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_mail/6
您确定您已经做了以下工作:
module;
我的还不错。我也安装了SMTP模块,它可以与选择为电子邮件引擎的任何模块一起工作。
https://stackoverflow.com/questions/5702562
复制相似问题