Jump to content

HTML EMAIL PROBLEM


slightbrand

Recommended Posts

Hello

 

I have a problem with my html email - My code can send the email but i can't see the email on my yahoomail or gmail...

Here is the code

<?php

$to = 'slightbrand@gmail.com';

$subject = 'Test HTML Email';

$headers = "From: slightbrand@yahoo.com\r\n";
$headers .= "Reply-To: slightbrand@yahoo.com\r\n";
$headers .= "CC: slightbrand1@ymail.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";


$message = '<html><body>';

$message .= '<table style="width:100%; border:none;">';
$message .= '<TR> <TD colspan="2"> Thanks for using Mobile Nets</TD> </TR>'; 
$message .= '<TR><TD style="width:80px;"><b>Name</b></TD><TD> Dummy </TD></TR>';
$message .= '<TR><TD style="width:80px;"><b>Age</b></TD><TD> 16 </TD></TR>';
$message .= '<TR><TD style="width:80px;"><b>Address</b></TD><TD> Address of me </TD></TR>';
$message .= '<TR><TD style="width:80px;"><b>Message</b></TD><TD> Test Email </TD></TR>';


$message .= '</table>';
$message .= '</body></html>';

if(mail($to, $subject, $message, $headers)){
echo "Email Sent";
}else{
echo "Error while trying to send the email";
}

?>

 

Can someone tell me what the problem is? thanks

Link to comment
Share on other sites

Finally my html email work but have problems after seeing the email... The email result that i get is..

 

<html><body><table style="width:100%; border:none;"><TR> <TD colspan="2"> Thanks for using Mobile Nets</TD> </TR><TR><TD style="width:80px;"><b>Sender</b></TD><TD> +639217195804 </TD></TR><TR><TD style="width:80px;"><b>Date</b></TD><TD> 12/12/12 </TD></TR><TR><TD style="width:80px;"><b>Time</b></TD><TD> 10:30:23 </TD></TR><TR><TD style="width:80px;"><b>Message</b></TD><TD> Test Email </TD></TR></table></body></html>

 

Any ideas why i have this as the result?

 

thanks

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.