include('mail.php');
$recipients = array( 'someone@example.com' ); # can be one or more emails
$headers = array (
'from' => 'someone@example.com',
'to' => join(', ', $recipients),
'subject' => 'testing email from project web',
);
$body = this was sent via php from project web!\n;
$mail_object =& mail::factory('smtp',
array(
'host' => 'prwebmail',
'auth' => true,
'username' => 'your_project_name',
'password' => 'password', # as set on your project's config page
#'debug' => true, # uncomment to enable debugging
));
$mail_object->send($recipients, $headers, $body);
includes/mail.inc文件内容:
请下载drupal7.12,阅读includes/mail.inc
感激涕零!
回复讨论(解决方案) 自带的mail不行,试试第三方的phpmailer
i forgot to tell you, phpmailer couldn't work on this project web.
如果是wordpress程序可以整合wordpress smtp弄...另外discuz可以自己后台设置,另外sourceforge的邮箱可以用
host: prwebmail
https://sourceforge.net/p/forge/documentation/project%20web%20email/