Page 1 of 1

Two problems with mail function.

Posted: Sun Oct 22, 2006 9:45 am
by amir
I have two problems with mail.

1.) When i receive a mail in outlook i see the html format with the message
example : (<tr><td>Hi this is tha mail you asked for....</td></tr>)

2.) I cant receive anything in hotmail.
Should i add something more to the header section ? Why hotmail reject my mails ?
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
I use this :

Code: Select all

$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=iso-8888-8\r\n";
$headers .= "Email from http://www.example.com \r\n";

$message = '
<html>
<body>
<table align=center width=50%>
<tr>
  <td>Example</td>
</tr>
</body>
</html>';

$to=$_POST['youremail'];
$subject = $_POST['theme'];

...
mail($to, $subject, $message, $headers);
...
Thanks in advance :)

Posted: Sun Oct 22, 2006 12:41 pm
by volka
Does it have to be a self-tinkered script using php's mail()?
If not there are many scripts/classes that can help you to create valid mime mails.
phpmailer, swiftmailer even got its own forum here on the board, pear classes ...make your choice.

Posted: Sun Oct 22, 2006 2:58 pm
by amir
Thanks for your reply. I 'll certainly try them. :)