以文本格式发送多行邮件

编程入门 行业动态 更新时间:2024-10-26 17:32:05
本文介绍了以文本格式发送多行邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Bonjour, 我正在使用PHPMailer类发送邮件,它适用于HTML。 但是我无法正确发送文本格式的邮件... 我试过这个: - $ message ="第一行* \ n *第二行" ;; - $ message ="第一行* \\\ n \\ n *第二行" ;; - $ message =" first line *" .chr(13).chr(10)* second line" ;; - $ message =" first line * * second line" ;; 结果总是一样的(我尝试了许多邮件阅读器,如Outlook Express, Yahoo,...):正文只出现在一行,间隔2 *,而不是回车... 第一行* *第二行 感谢您的任何想法!

Bonjour, I''m using PHPMailer class to send mails and it works fine for HTML ones. But I can''t manage to send correctly a text formatted mail... I tried this : - $message = "first line*\n*second line"; - $message = "first line*\r\n*second line"; - $message = "first line*".chr(13).chr(10)*second line"; - $message = "first line* *second line"; Result is always the same (I tried many mail readers like Outlook express, Yahoo, ...) : the body appears on only one line, with a space between the 2 *, instead of a carriage return... first line* *second line Thanks for any idea !

推荐答案

message ="第一行* \ n *第二行" ;; - message = "first line*\n*second line"; -

message =&q uot;第一行* \\\ n \\ n *第二行" ;; - message = "first line*\r\n*second line"; -

message =" first line *" .chr(13) .chr(10)*第二行; - message = "first line*".chr(13).chr(10)*second line"; -

更多推荐

以文本格式发送多行邮件

本文发布于:2023-11-11 06:34:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577647.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   邮件   格式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!