是这样的,我用 cPanel 创建了一个邮箱,想在 SpringBoot 项目中配置邮件服务器,发送邮件。结果将用户名和密码、邮件主机配置完后怎么也发送不成功。我就进入邮件面板,手动向 Gmail、iCloud 邮箱发送邮件,结果也是发送失败。
Mail delivery failed: returning message to sender .The IP you’re using to send mail is not authorized to
send email directly to our servers. Please use the SMTP relay at your.
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
查了一遍后才知道,为防范垃圾邮件,Gmail(等其他国际邮箱) 会拦截由未获授权的 IP 地址发出的邮件 ‘The IP you’re using to send email is not authorized…’(“您用于发送电子邮件的 IP 未经授权…”)。
解决办法也是参照上面的提醒,点击上图的链接,上图链接中已经带上你的 IP。或者自己进入网站 https://check.spamhaus.org/,手动输入你的 IP 检查。
接着就很简单,下一步就行。
不出意外,你上面填写的邮箱会收到一封邮件,点击里面的链接验证,最后就会收到移出成功的提醒。但我测试,可能要一点时间(半小时)才能解除成功。
放弃,解除后可以向 QQ 邮箱、iCloud 邮箱发送邮件,但 Gmail 依然不行。最后使用 QQ 普通个人邮箱当做邮件发送服务器。
本文由老郭种树原创,转载请注明:https://guozh.net/cpanel-failed-to-send-to-an-international-mailbox/