在以HTML格式发送电子邮件时删除新的行标记

时间:2016-01-09 18:50:19

标签: html email textarea

我正在创建一个电子邮件表单,并发送了以下测试消息:

test







test test

但是,我收到了以下电子邮件,其中包含代表新行的标签和字符实体:

<p>test</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>test test</p>

这是处理邮件的PHP代码:

var $useragent      = "CodeIgniter";
var $mailpath       = "/usr/sbin/sendmail"; // Sendmail path
var $protocol       = "mail";   // mail/sendmail/smtp
var $smtp_host      = "";       // SMTP Server.  Example: mail.earthlink.net
var $smtp_user      = "";       // SMTP Username
var $smtp_pass      = "";       // SMTP Password
var $smtp_port      = "25";     // SMTP Port
var $smtp_timeout   = 5;        // SMTP Timeout in seconds
var $wordwrap       = TRUE;     // TRUE/FALSE  Turns word-wrap on/off
var $wrapchars      = "76";     // Number of characters to wrap at.
var $mailtype       = "text";   // text/html  Defines email formatting
var $charset        = "utf-8";  // Default char set: iso-8859-1 or us-ascii
var $multipart      = "mixed";  // "mixed" (in the body) or "related" (separate)
var $alt_message    = '';       // Alternative message for HTML emails
var $validate       = FALSE;    // TRUE/FALSE.  Enables email validation
var $priority       = "3";      // Default priority (1 - 5)
var $newline        = "\n";     // Default newline. "\r\n" or "\n" (Use "\r\n" to comply with RFC 822)
var $crlf           = "\n";

0 个答案:

没有答案