我正在尝试发送一封指定发件人的电子邮件。相反,我得到了Nobody@host.edu
$test='example body'.$random_String;
$message3 = array(
'to' => 'fake_user@place.com',
'from' => 'fake_sender@place.edu',
//'from' => variable_get('site_mail', 'admin@example.com'), //alternative doesn't work either
'subject' => t('Example subject'),
'body' => $test,
'headers' => array(),
);
drupal_mail_send($message3);发布于 2013-02-05 20:38:38
请阅读drupal_mail_send()函数的文档。您没有为drupal_mail_send()提供正确的参数。你错过了id密钥。另外,这个函数已经使用了PHP的mail(),所以你不必直接使用它。
发布于 2013-02-05 13:27:42
只需使用老的php mail()函数http://www.php.net/manual/en/function.mail.php即可
https://stackoverflow.com/questions/14699796
复制相似问题