我在让我的sendmail在Xammp中工作时遇到了问题。
使用sendtodisk时,邮件工作得很好,但现在我使用sendmail得到了一个崩溃日志:
PHP发送电子邮件(使用PHP Mailer):
$mail = new PHPMailer;
$mail->setFrom($from_email, 'Thomas ****');
$mail->addAddress('thomas@****.co.za', 'Client');
$mail->Subject = 'Sign Offs';
$mail->Body = generateMailTemplate($job_id, $to_email, $from_email, $name);
$mail->addAttachment('tmp/'.$job_id.'.pdf');
$mail->isHTML(true);
if (!$mail->send()) {
return $mail->ErrorInfo;
} else {
return true;
}php.ini
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"sendmail.ini
smtp_server=outbound.mailhop.org
smtp_port=25crash.log
command line : C:\xampp\sendmail\sendmail.exe -t -fthomas@****.co.za有什么想法吗?
发布于 2015-11-16 23:01:42
尝试为您的phpmailer脚本设置smtp,而不是为php
$mail = new PHPMailer();
$mail->isSMTP();
$mail->Host = 'outbound.mailhop.org';
$mail->Port = 25;
// if need auth
$mail->SMTPAuth = true;
$mail->Username = 'user';
$mail->Password = 'password';
$mail->Subject = 'subject';
$mail->Body = 'body';
$mail->send();https://stackoverflow.com/questions/33738159
复制相似问题