Hi,
When I want to send email, my codes look like these:
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: me@localhost' . "\r\n";
// Email Variables
$toUser = 'you@something';
$subject = "Testing";
$body = '<html><head><title></title></head><body>
This is my picture <img src="http://domain.com/me.jpg">';
if(mail($toUser,$subject,$body,$headers)){
echo "Email sent!!";
}
Here are my questions:
- Must I include the
<html>, <head>, <title>...
tags? - Can I use stylesheet? For example,
<div style="...">
? - I tested send the email to several accounts, if I include the
<img>
tag (for include image), it goes to junk mails, but if just plain text it goes to inbox. Anyone has any idea why it is? And how to solve it?