Extra “\\n ” in Mandrill raw_message break some links

杀马特。学长 韩版系。学妹 提交于 2019-12-04 07:50:45

We typically see this kind of issue with SMTP libraries or frameworks that generate HTML with no true line breaks. The SMTP specs state that the line length for email shouldn't exceed 1000 characters. When that limit is reached, a line break gets inserted automatically when the message data is being transmitted over SMTP. This unfortunately often happens right in the middle of a word or a URL, for example. You'll want to take a look at your SMTP library to see if you can modify how line breaks are being handled.

If you're using HTML line breaks like <br> that are being used to indicate a break, those unfortunately won't help in this case. Adding your own line breaks (not HTML line breaks, but actual line breaks in the data such as a newline or end of line - usually \r\n - will help ensure that the forced line breaks aren't arbitrarily added in the SMTP conversation in inconvenient places.

Are you sure that you are sending e-mails in HTML format? Seems like you send it in plain text format and Mandril align it to one column. Can you calculate position of \n symbol?

Update:

Try to set X-MC-Autotext e-mail header to no and X-MC-AutoHtml to no too. All headers described is here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!