Jump to content

Sending formatted HTML Mail using PHP


sngumo

Recommended Posts

I have the following code I am using to send mail but I dont seem to get it correct!!!

 

The code

**************************************

$p_email = $m_email;

$p_message = '<html><body><p>'.$reload_message2.'<br/><br/> The Name of our Member: <b>'.$s_name.'</b>'

.'<br/> Article transfered: <b>'.$article.'</b>'

.'<br/><br/>'.$disclaimer.'</p></body></html>';

 

$p_subject = $s_name.' wants to load his articles.';

 

$p_headers = "MIME-Version: 1.0"."\r\n";

$p_headers .= "Content-type:text/html; charset=iso-8859-1"."\r\n";

$p_headers .= "From MRADDI";

 

if (!@mail($p_email,$p_subject,$p_message,$p_headers))

{

echo "The partner emails have not been sent.";

}

**************************************

 

This is the email sent

**************************************

From MRADDI

 

 

The client below wants transfer his articles. The details

of his account and the articles to be transfered are listed below. Please log into our system and verify the details below: The Name of our Member: Stanley Ngumo Muchiri Article transfered: 1900Please use the link we provided you on registration into the network. We DONT provide a link to our site on this email for security purposes. Therefore please use it to login and verify the above transaction.

**************************************

 

As you can see the email doesnt have the formatting I have encoded into the message.

 

What am I doing wrong???????

Link to comment
https://forums.phpfreaks.com/topic/145913-sending-formatted-html-mail-using-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.