使用phpmailer在电子邮件正文中出现感叹号 [英] exclamation mark is appears in email message body using phpmailer
本文介绍了使用phpmailer在电子邮件正文中出现感叹号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用phpmailer在我的网站中发送电子邮件.我的代码工作正常,但有时在电子邮件正文中的随机位置包含感叹号.我的代码如下:
I m using phpmailer for sending emails in my website. My code works fine but sometimes in email message body contains exclamation mark at random places. My code is as follows:
$mail->SetFrom(FROM_EMAIL,FROM_NAME); //emailid of sender(admin)
$mail->Subject = 'Subject here.'; //subject of email
$mail->AddAddress(Address here); //emailid of user(recipient)
$content = 'some html code here';
$mail->MsgHTML($content); //this is body of email
$mail->Send();
这很好.但是找不到为什么有时会出现惊叹. 预先感谢...
This works fine. But can't find why exclamation comes sometimes. Thanks in advance...
推荐答案
我认为这是因为电子邮件在一行中的字符数不能超过998个.
I think it's because the email messages can't have more than 998 characters on one line.
尝试添加,
$mail->WordWrap = 50;
这篇关于使用phpmailer在电子邮件正文中出现感叹号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文