Page 1 of 1

html from textbox

Posted: Thu Feb 15, 2007 1:28 pm
by reecec
Hi,

I have an email script for html but it doest come out exactly right i have used the content type:

Code: Select all

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
but when i send it using a client it has the content type multipart/related which works

Any ideas?

Regards,

Reece

Posted: Thu Feb 15, 2007 2:21 pm
by Chris Corbyn
Where's the rest of the code? That sounds like an odd thing to happen.

Posted: Thu Feb 15, 2007 2:25 pm
by reecec

Code: Select all

$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: $_SERVER[HTTP_HOST]<$aset[MerchantEmail]>";


			$subject = $_POST[subject];


			while($a1 = mysql_fetch_array($r1))
			{
				
$to = $a1[nemail];

				mail($to, $subject, $_POST[mm], $headers);

				$i++;
			}

		}
It takes a textbox input to send the message


the html is different when sent from here then we i send it from email client

Thanks for your reply

Posted: Thu Feb 15, 2007 4:41 pm
by reecec
Right, I have put the html in a var instead of $_POST from the text box and it works fine so its not the headers

something to do with when sending html in the text area form


Thanks,

Reece