CFMail 具有包罗万象的电子邮件地址

发布于 2024-08-01 13:58:37 字数 2139 浏览 7 评论 0原文

我不敢相信我以前从未注意到这一点,但 CFMail 似乎不会发送到目标邮件服务器上未明确设置的电子邮件地址。

这意味着,如果我使用 '[email protected]' 并拥有设置为捕获域中的所有电子邮件时,CFMail 不会发送到 '[电子邮件]受保护]'。

这给我带来了很多问题,因为我使用 CFMail 发送订单确认、会员激活和各种其他零碎信息。

无论您对使用包罗万象的地址有何看法,都不能否认人们确实使用了它们。因此,在任何情况下,用户在我的网站之一中输入虚构的地址,他们都不会收到电子邮件。

一定有办法解决这个问题——任何人都可以帮忙吗?

作为参考,发送到包罗万象的地址时日志中显示的消息是“无效地址”。

编辑:这是我正在使用的 CFMail 语法 -

<cfmail to="#Arguments.sEmailAddress#" from="#Application.sAppEmailAddress#" subject="Stock reminder confirmation: #Local.qGetProductDetails.sProductName# - #Application.sCompanyName#" type="HTML" server="#Application.sAppEmailServer#" username="#Application.sAppEmailAddress#" password="#Application.sAppEmailPassword#">

翻译为:

<cfmail to="[email protected]" from="[email protected]" subject="Stock reminder confirmation: Some product - My Company" type="HTML" server="mail.mydomainname.com" username="[email protected]" password="XXXXXX">

[email] 一切正常protected] 但不适用于 [email&n bsp;受保护]

当然,值得注意的是,包罗万象在所有其他方面都工作正常,来自邮件客户端的测试电子邮件工作完美。

I can't believe I've never noticed this before, but it seems that CFMail won't send to an email address that isn't explicitly set up on the destination mailserver.

This means that if I'm using '[email protected]' and have that set up to catch all email on the domain, CFMail won't send to '[email protected]'.

This causes a massive amount of problems for me, as I'm using CFMail to send out order confirmations, member activations and all manner of other bits and pieces.

Whatever your views on using catchall addresses, it can't be denied that people do use them So, in any case that a user enters a made-up address into one of my sites, they won't receive their email.

There must, simply MUST be a way around this - can anyone help?

For refernece, the message that appears in the logs when sending to a catchall address is 'Invalid Addresses'.

EDIT: Here's the CFMail syntax I'm using -

<cfmail to="#Arguments.sEmailAddress#" from="#Application.sAppEmailAddress#" subject="Stock reminder confirmation: #Local.qGetProductDetails.sProductName# - #Application.sCompanyName#" type="HTML" server="#Application.sAppEmailServer#" username="#Application.sAppEmailAddress#" password="#Application.sAppEmailPassword#">

Translates into:

<cfmail to="[email protected]" from="[email protected]" subject="Stock reminder confirmation: Some product - My Company" type="HTML" server="mail.mydomainname.com" username="[email protected]" password="XXXXXX">

All works fine for [email protected] but not for [email protected].

Important to note of course, that the catch-all is working correctly in all other respects, test emails from mail clients work perfectly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

囚我心虐我身 2024-08-08 13:58:38

呃!

原来是服务器的问题。 由于某种原因,全服务器范围内的所有电子邮件帐户已停止正常工作。 在向我的托管提供商发送电子邮件后,一切正常,无需更改代码。

他们对于导致问题的原因有些谨慎,而且我仍然能够使用电子邮件客户端将邮件发送到这些地址...

无论如何,感谢您的帮助。 ;)

Urgh!

Turns out it was an issue with the server. For some reason, catchall email accounts serverwide had stopped working properly. After an email to my hosting provider, it's all working fine with no code changes.

They're somewhat cagey as to what caused the issue, and I was still able to use an email client to send mail out to the addresses...

Thanks for the help in any case. ;)

歌入人心 2024-08-08 13:58:37

我可以看看你的 CFMAIL 标签设置吗? 只要电子邮件地址格式正确,CFMAIL 并不关心。

Can I see your CFMAIL tag setup? CFMAIL doesn't care as long as the email address is properly formatted.

青芜 2024-08-08 13:58:37

关心电子邮件有效性的不是 ColdFusion,而是 SMTP 服务器。 CF 只关心格式正确的电子邮件地址。

如果您启动到邮件服务器的 telnet 会话并尝试使用相同的地址,我确信它会产生相同的结果。

SMTP 连接的调试提示:
http://www.talkingtree.com/blog/index .cfm/2004/11/22/debug-smtp

Its not ColdFusion that cares about email validity, its the SMTP server. CF only cares about well formed email addresses.

If you initiated a telnet session to your mail server and tried to use the same address, I'm sure it would have the same result.

Debugging tips for SMTP Connectivity:
http://www.talkingtree.com/blog/index.cfm/2004/11/22/debug-smtp

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文