我正在使用 Gmail SMTP 和 WordPress 来通过我的自定义域发送邮件(user@example.com)
。电子邮件已成功发送,但始终位于每个网络邮件提供商的垃圾邮件文件夹中(例如 Gmail、Rediffmail、Yahoo、Outlook 等)
Gmail SMTP server address: smtp.gmail.com
Gmail SMTP name: Your full name
Gmail SMTP username: Your full Gmail address (e.g. you@gmail.com)
Gmail SMTP password: The password that you use to log in to Gmail
Gmail SMTP port (TLS): 587
Gmail SMTP port (SSL): 465
Run Code Online (Sandbox Code Playgroud)
发生这种情况是因为他们无法验证该电子邮件的发件人以及 DNS 记录(例如 SPF 和 DKIM)。我用谷歌搜索,得到了 Gmail 的 SPF 记录v=spf1 a include:_spf.google.com ~all
但是如何为我的 Gmail SMTP 生成 DKIM。我已经检查了这个Google文档: https: //support.google.com/a/answer/180504#turn-on-dkim,但它是关于Google Business Mail/WorkMail而不是免费Gmail (user@gmail.com)。 …