Problem sending email with Codeigniter - Headers sent in the message body
Posted
by
Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2011-01-07T15:21:17Z
Indexed on
2011/01/11
14:54 UTC
Read the original article
Hit count: 381
Having a strange issue with the email class in codeigniter. When I send email directly to my gmail account email address, it works fine. However if I send email to a different email address and use POP3 to import that email address into gmail, then for some reason all the headers are included in the message.
Here's the code for sending the email:
$this->email->clear();
$config['mailtype'] = "html";
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'Website');
$this->email->to('[email protected]');
$this->email->message($message);
Here's what arrives in my inbox when the email is sent to an account which is imported into gmail via POP3:
Date: Fri, 7 Jan 2011 15:07:04 +0000
From: "Website" <[email protected]>
Reply-To: "[email protected]" <[email protected]>
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
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--
© Stack Overflow or respective owner