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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.