I am using php/Mail_mime to send styled html content using the code below.
$headers = array ('From' => $sender,
'To' => implode(',',$to),
'Subject' => $subject,
'Reply-To'=>'myemail@mydomain.com',
'MIME-Version'=>'1.0',
'Content-Type'=>'text/html'
);
/*end header*/
$this->mime = new Mail_mime();
$tt=$this->mime;
$tt->addBcc(implode(',',$bcc));
$tt->addCc(implode(',',$cc));
$tt->setTXTBody($text);
$tt->setHTMLBody($body);
$tt->addHTMLImage('../images/delete.gif');
// $tt->addAttachment('../images/delete.gif','image/gif');
$mime_body = $tt->get();
$mime_hdrs = $tt->headers($headers);
$smtp = Mail::factory('smtp',
array ('host' => $this->host,
'port' => $this->port,
'auth' => false,
'username' => $this->username,
'password' => $this->password));
$recipients=array_merge($to,$cc,$bcc);
$mail = $smtp->send($recipients, $mime_hdrs, $mime_body);
This is all a class code, so initialization is done on the constructor, which is not posted here.
Now my question is, while the above code works fine, i didnt see the correct style on the email sent.
for example if i have this as a message body of my email:
<div style="background-color:silver;">
<h1>
MY Header</h1>
</div>
On my email, I can only see the My Header. The background didnt showup as silver.
What did i miss on my code above. Any help ?