Welcome Guest, Not a member yet? Register   Sign In
HTML E-mail not being received
#1

[eluser]Joozt[/eluser]
Hello,
I am trying to send HTML mails with the codeigniter Email library, but HTML mails are not being received at all. I wonder if I need to set some other variables to enable it to work or maybe it is just a server configuration which needs to be changed. Any help will be greatly appreciated.

Plain text emails are being send and received perfectly, the only thing I don’t understand is that I set the from email and name, but the e-mails headers which I receiver are bit weird, because it says they are being send by www-data, this is what I receive:
-----TEXT Email-----
from :www-data <www-data@localhost.av-ix.net>reply-to "[email protected]" <[email protected]>
to: [email protected]
date Mon, Mar 1, 2010 at 10:24 AMsubject Email Test
---
Message
-----End Email----

PHP controller code:
Code:
$this->load->library('email');
$this->email->from('[email protected]', 'Your Name');
$this->email->to('[email protected]');
$this->email->set_mailtype('html');
$this->email->subject('Email Test');

$message.='
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
$message.="&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Welcome&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
<table>
<tr>
    <td>test</td><td>test2</td>
<tr>
</table>
&lt;/body&gt;
&lt;/html&gt;";

$this->email->message($message);
//I also tried using this function, but still the email is not being received
//$this->email->set_alt_message($message);  

$this->email->send();

echo $this->email->print_debugger();


The debugger prints the following message:
email_sent
From: "Your Name"
Return-Path:
Reply-To: "[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_4b8b8d7fe963b"

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_4b8b8d7fe963b
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

test test2


--B_ALT_4b8b8d7fe963b
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=?utf-8?Q?Email_Test?=


--B_ALT_4b8b8d7fe963b--


I hope someone know whats wrong, because I can't seem to figure it out.

Thanks in advance!
#2

[eluser]bluepicaso[/eluser]
This might be due to Server Reputation. I got the same issuew. I was sending an email using gmail SMTP. My the was blocked by gmail.
Try code on another server.




Theme © iAndrew 2016 - Forum software by © MyBB