在Codeigniter中使用电子邮件类时遇到了奇怪的问题。当我直接向我的Gmail帐户发送电子邮件时,它可以正常工作。但是,如果我向不同的电子邮件地址发送电子邮件并使用POP3将该电子邮件地址导入到Gmail中,则某些原因会在消息中包含所有标题。
以下是发送电子邮件的代码:
$this->email->clear();
$config['mailtype'] = "html";
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from('email@example.com', 'Website');
$this->email->to('accountthatimportstogmail@url.com');
$this->email->message($message);
当电子邮件通过POP3导入到Gmail中,以下是我收件箱中收到的内容:
Date: Fri, 7 Jan 2011 15:07:04 +0000
From: "Website" <email@example.com>
Reply-To: "email@example.com" <email@example.com>
X-Sender: email@example.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <4d272c1835479@example.com>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4d272c1835c46"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_4d272c1835c46
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
this is the email message content
--B_ALT_4d272c1835c46
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html>
<body>
<p>this is the email message content
</p>
</body>
</html>
--B_ALT_4d272c1835c46--