使用 Perl 将电子邮件直接发送到收件人邮件服务器
我需要编写一个小型 Perl 应用程序来将电子邮件直接发送到收件人的邮件服务器。我无法使用本地邮件服务器,因为我需要在发生电子邮件错误时立即了解情况。
我知道 Email::Sender 和 Net::SMTP,但是有没有 Perl 模块可以处理 MX 查找,甚至可能重试?
I need to write a small Perl application to send email directly to the recipients' mail servers. I can't use a local mail server because I need to know about email errors immediately when they happen.
I know about Email::Sender and Net::SMTP, but are there any Perl modules that will handle the MX lookups, and possibly even the retries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如今,很少有 SMTP 服务器会接受来自未配置为中继的独立计算机的邮件 - 特别是如果它们不反向解析到发送域 MX 记录。但是,如果您愿意等待(可配置的)短时间来了解您的电子邮件发生了什么,那么您可以在正确配置的 SMTP 中继上考虑以下几个选项:
邮件知道对于看似简单的事情(例如检查您的电子邮件发生了什么)需要做很多工作,但如果您坚持不使用 Net::SMTP :),这是您能做的最好的事情,同时还避免 SMTP 服务器拒绝您的邮件的风险
Very few SMTP servers, today, would accept mail from stand alone machines not configured as Relays - especially if they do not reverse resolve to the sending domains MX record. However if you are willing to wait for a (configurable) short time to know what happened to your email, here are a few options that you could consider on a properly configured SMTP Relay:
I know thats a lot of work for something seemingly simple as checking what happens to your email, but this is the best you can do if you insist on not using Net::SMTP :) while also avoiding the risk of SMTP servers refusing your mail