1

我注意到每次下订单时都会从我的服务器收到一封电子邮件。看起来客户确认电子邮件没有发送。

这是错误消息的一部分:

A message that you sent contained one or more recipient addresses that were
incorrectly constructed:

=?utf-8?B?R3Vlc3Q=?= <>: missing or malformed local part

This address has been ignored. The other addresses in the message were
syntactically valid and have been passed on for an attempt at delivery.

------ This is a copy of your message, including all the headers. ------

To: =?utf-8?B?R3Vlc3Q=?= <>
Subject: =?utf-8?B?SW50ZWxsaWdlbnQgV29ya3Nob3A6IE5ldyBPcmRlciAjIDEwMDAwMDAzMA==?=

看起来只有当用户在没有注册的情况下结帐

4

3 回答 3

4
=?utf-8?B?R3Vlc3Q=?= <>: missing or malformed local part

错误信息非常明显: 之间应该有一个电子邮件地址<>,但没有。本地部分是地址前面的部分,@因为这里什么都没有,所以没有本地部分。因此,您的服务器正在抱怨。

您必须修复任何试图发送邮件的应用程序以<>消除错误。

于 2014-12-08T13:41:30.563 回答
0

电子邮件地址的格式不正确,请使用 <>

于 2014-12-08T13:39:16.227 回答
0

我真的不明白你想做什么。但这就是我发现玩这个错误的原因。

$to          = "'Name of Person' <email@example.com>";
$headers     = "From: ".$_POST['theirName']."<".$_POST['theirEmail'].">\r\n";

$subject     = $_POST['subject'];
$messageBody = $_POST['message']."\r\n ---\n This Message was sent from ".HOME." contact form.";

mail($to,$subject,$messageBody,$headers);

请注意,“人名”周围有单引号。如果您尝试在电子邮件前发送带有其他名称、标题或其他任何内容的电子邮件。使用单引号会让 PHP 知道它不是电子邮件而是字符串,它会添加字符串但作为电子邮件被忽略,不再给您错误。

它声明的标题不需要单引号。

=?utf-8?B?R3Vlc3Q=?= <-This line I don't know what it supposed to be doing.

但它不是 $to/$recipient 上的电子邮件,因此它给出了错误。再一次,必须只有电子邮件:“email1@example.com,email2@example.com”,除此之外:'String' 带单引号不会产生错误......

于 2018-10-30T20:50:10.497 回答