收件人地址上的PHPMailer字符 [英] PHPMailer Character ñ on recipient address

查看:103
本文介绍了收件人地址上的PHPMailer字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试发送电子邮件到包含字母ñ的收件人地址时,我收到了phpmailer的下一个错误,例如:

I'm getting the next error on phpmailer when trying to send an email to a recipient address containing the letter "ñ", e.g.:


致命错误:未捕获的异常'phpmailerException'与消息
'无效地址:lauro.muñoz@live.com.mx'

Fatal error: Uncaught exception 'phpmailerException' with message 'Invalid address: lauro.muñoz@live.com.mx'


$ b $我知道它是一个无效的地址,它只是因为它包含字母ñ,使用 $ mail-> CharSet ='UTF-8'; after $ mail = new PHPMailer(true); ,不起作用。

I know it says it is an invalid address, and it only because it contains the letter ñ, using $mail->CharSet = 'UTF-8'; after $mail = new PHPMailer(true);, doesn't work.

没有ñ工作正常的任何常规地址。有没有办法使电子邮件地址有效?

Any regular address without ñ work fine. Is there any way to make email addresses with ñ valid?

推荐答案

似乎这些字符不允许电子邮件地址的一部分本地部分 http://en.wikipedia.org/ wiki / E-mail_address#Local_part

It seems that those kind of chars aren't allowed to be part of the "local part" of the email address http://en.wikipedia.org/wiki/E-mail_address#Local_part.

这篇关于收件人地址上的PHPMailer字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆