plodos Posted February 19, 2008 Share Posted February 19, 2008 this code is a little easy to understand... but problem is same, mixing the HTML codes and Variables... for example like that -> http://img405.imageshack.us/img405/9733/testrs6.jpg Have u any idea, for this code!!!!! why its mixing and solution way?_????? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> </head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <body> <?php $name = "xxx"; $surname = "yyy"; $to="bbb@bbb.com"; $aut_email="xxx@xxx.com"; $headers = "From: $aut_email \n"; $message= ' <table width="522" height="235" border="1"> <tr> <td width="105" height="23" bgcolor="#CCCCCC">Name Surname </td> <td width="403" bgcolor="#CCCCCC">'.$name.' '.$surname.'</td> </tr> </table>'; if(mail($to, $title,$message,$headers)) echo "send"; else "not send" ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
Chris92 Posted February 19, 2008 Share Posted February 19, 2008 Why don't you use doubble quotations? $message= " <table width=\"522\" height=\"235\" border=\"1\"> <tr> <td width=\"105\" height=\"23\" bgcolor=\"#CCCCCC\">Name Surname </td> <td width=\"403\" bgcolor=\"#CCCCCC\">$name $surname</td> </tr> </table>"; Quote Link to comment Share on other sites More sharing options...
plodos Posted February 19, 2008 Author Share Posted February 19, 2008 like that <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> </head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <body> <?php $name = "xxx"; $to="boraardil@gmail.com"; $aut_email="xxx@xxx.com"; $headers = "From: $aut_email \n"; $message= " <table width=\"522\" height=\"235\" border=\"1\"> <tr> <td width=\"105\" height=\"23\" bgcolor=\"#CCCCCC\">Name Surname </td> <td width=\"403\" bgcolor=\"#CCCCCC\">$name</td> </tr> </table>"; if(mail($to, $title,$message,$headers)) echo "send"; else "not send" ?> </body> </html> in my opinion, you didnt test it...It is not working Another way? Problem is same still mixing the code????????????????? Quote Link to comment Share on other sites More sharing options...
Dragen Posted February 19, 2008 Share Posted February 19, 2008 where are you setting the mime version of the email? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 19, 2008 Share Posted February 19, 2008 Are you trying to say that it's not showing up as an HTML email? You need to have the content-type specified in the headers to tell the email client it's HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> </head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <body> <?php $name = "xxx"; $surname = "yyy"; $to="bbb@bbb.com"; $aut_email="xxx@xxx.com"; $title = "This is my title"; //You never specify a title, I added this one for you $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "To: $to\r\n"; $headers .= "From: $aut_email\r\n"; $message= ' <table width="522" height="235" border="1"> <tr> <td width="105" height="23" bgcolor="#CCCCCC">Name Surname </td> <td width="403" bgcolor="#CCCCCC">'.$name.' '.$surname.'</td> </tr> </table>'; if(mail($to, $title,$message,$headers)) echo "send"; else "not send" ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
plodos Posted February 19, 2008 Author Share Posted February 19, 2008 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> </head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <body> <?php $name = "xxx"; $surname = "yyy"; $to="bbb@bbb.com"; $aut_email="xxx@xxx.com"; $headers = "From: $aut_email \n"; $headers .= 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-9' . "\n"; $message= ' <table width="522" height="235" border="1"> <tr> <td width="105" height="23" bgcolor="#CCCCCC">Name Surname </td> <td width="403" bgcolor="#CCCCCC">'.$name.' '.$surname.'</td> </tr> </table>'; if(mail($to, $title,$message,$headers)) echo "send"; else "not send" ?> </body> </html> i put the mime, but it is not working I dont know how many methods i applied I didnt solve this problem? Quote Link to comment Share on other sites More sharing options...
plodos Posted February 19, 2008 Author Share Posted February 19, 2008 ok, i did it... rhodesa's code is working clearly..thnx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.