Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHPMailer发送多封电子邮件失败_Php_Phpmailer - Fatal编程技术网

PHPMailer发送多封电子邮件失败

PHPMailer发送多封电子邮件失败,php,phpmailer,Php,Phpmailer,我和PHPMailer有问题。我正在为一家公司的求职申请创建一个页面。有一张申请者填写的表格,表格数据发送给人力资源部。然后,服务器必须自动响应申请者,感谢申请者。发送给人力资源部的第一封电子邮件已发送,但第二封未发送。代码是: $mailer = new PHPMailer(); $mailer->From = "admin@bav.hu"; $mailer->FromName = "Báv gyakornoki jelentkezés"; $mailer->AddAddre

我和PHPMailer有问题。我正在为一家公司的求职申请创建一个页面。有一张申请者填写的表格,表格数据发送给人力资源部。然后,服务器必须自动响应申请者,感谢申请者。发送给人力资源部的第一封电子邮件已发送,但第二封未发送。代码是:

$mailer = new PHPMailer();
$mailer->From = "admin@bav.hu";
$mailer->FromName = "Báv gyakornoki jelentkezés";
$mailer->AddAddress("dudas.krisztian@nerddevelopments.com", "the subject");
$mailer->isHTML(true);
$mailer->CharSet = 'UTF-8';
$mailer->Subject = "Báv gyakornoki regisztráció";
$body = "The body with the form data to HR";
$mailer->Body = $body;
$mailer->AddAttachment($cv_path, $_FILES['cv']['name']);
$mailer->AddAttachment($motivation_letter_path, $_FILES['motivation']['name']);
$success = $mailer->send();
//this email gets sent
$autoresponse = new PHPMailer();
$autoresponse->From = "gyakornok@bav.hu";
$autoresponse->CharSet = "UTF-8";
$autoresponse->AddAddress($email);
$autoresponse->Subject = "This is an automatic message, please don't answer it";
$body = "This is the automatic response to the applicant";
$autoresponse->body = $body;
$autoresponse_sent = $autoresponse->send();
//this email won't get sent

改变

$autoresponse->body = $body;

$autoresponse->Body = $body;

谢谢,我最近也注意到了。。。该死的打字错误。。。我太蠢了