XAMMP Sendmail问题

时间:2015-11-16 14:49:56

标签: php xampp sendmail phpmailer

我遇到了让我的sendmail在Xammp中工作的问题。

使用sendtodisk时邮件运行正常,但现在我使用sendmail收到崩溃日志:

PHP发送电子邮件(使用PHP邮件程序):

$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=25

CRASH.LOG

command line      : C:\xampp\sendmail\sendmail.exe -t -fthomas@****.co.za

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

尝试为phpmailer脚本设置smtp设置,而不是为php

设置
<div class = "parent">
<ul>
  <li>first child</li>
  <li class = "has_children">second child
  <ul>
    <li>first grand child</li>
    <li>second grand child</li>
    <li>third grand child</li>
  </ul>
  </li>
  <li>third child</li>
  <li>fourth child</li>
</ul>
</div>