nik*_*san 7 php schema gmail spf tls1.2
好吧,我无法弄清楚这一点.我正在使用PHPMailer从我的域发送电子邮件 - example.com给自己.我正在给自己发送电子邮件.(测试谷歌架构标记),但电子邮件未经过身份验证.这是我用来向自己发送电子邮件的代码.
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = 2;
$mail->Host = 'tls://smtp.gmail.com';
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'tls';
$mail->Username = 'myemail@gmail.com';
$mail->Password = '';
$mail->setFrom('myemail@gmail.com');
$mail->addAddress('myemail@gmail.com');
$mail->Subject = 'Microdata Test';
$html = '
<html>
<head>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"description": "Check this out",
"potentialAction": {
"@type": "ViewAction",
"target": "https://www.youtube.com/watch?v=eH8KwfdkSqU"
}
}
</script>
</head>
<body>
<p>
This a test for a Go-To action in Gmail.
</p>
</body>
</html>
';
$mail->msgHTML($html);
$mail->send();
Run Code Online (Sandbox Code Playgroud)
这是我的spf记录:
v = spf1 a mx include:mailgun.org include:mydomain.com~all
由于您使用 Google 的 smtp 发送电子邮件,因此必须将其包含在 SPF 中:
include:_spf.google.com
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
211 次 |
| 最近记录: |