Link to home
Start Free TrialLog in
Avatar of aihaiai
aihaiai

asked on

send webpage from php send mail function

This is my code :

<?
//Email start
if ($_POST["r_email"]<>'') {
$ToEmail = 'examples@email.com';
$EmailSubject = 'Email Request via online form';
$mailheader = "From: ".$_POST["r_email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["r_email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
//Requester details
$MESSAGE_BODY .= "<font face=verdana size=2><u><strong>Requester details:</strong></u>"."<br>";
$MESSAGE_BODY .= "<strong>Name : </strong> ".$_POST["r_name"]."<br>";
$MESSAGE_BODY .= "<strong>Email : </strong> ".$_POST["r_email"]."<br>";
$MESSAGE_BODY .= "<strong>Contact No : </strong> ".$_POST["r_cont"]."<br>";
//Applicants details
$MESSAGE_BODY .= "<u><strong>Applicant details:</strong></u>"."<br>";
$MESSAGE_BODY .= "<strong>Name : </strong> ".$_POST["a_name"]."<br>";
$MESSAGE_BODY .= "<strong>1st email : </strong> ".$_POST["a_e1"]."<br>";
$MESSAGE_BODY .= "<strong>2nd email : </strong> ".$_POST["a_e2"]."<br>";
$MESSAGE_BODY .= "<strong>3rd email : </strong> ".$_POST["a_e3"]."<br>";
$MESSAGE_BODY .= "<strong>Contact No : </strong> ".$_POST["a_cn"]."<br>";
//Company details
$MESSAGE_BODY .= "<u><strong>Applicant details : </strong></u>"."<br>";
$MESSAGE_BODY .= "<strong>Name : </strong> ".$_POST["c_name"]."<br>";
$MESSAGE_BODY .= "<strong>Others company name : </strong> ".$_POST["c_names"]."<br>";
$MESSAGE_BODY .= "<strong>Department/unit : </strong> ".$_POST["c_dept"]."<br>";
$MESSAGE_BODY .= "<strong>Contact : </strong> ".$_POST["c_cont"]."<br>";

mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");

?>

With this code, i'm only able to send simple html to my email.
I would like to send it as webpage. A website in an email. I'm freely can using table, add more graphic on it. Spam email always do this. why not me.. hehe

the "$message_body" make me dificult to create what i want..

thanks..
Avatar of ljubiccica
ljubiccica
Flag of Slovenia image

Hey there!

Here is a nice tutorial how to send email in php, including html...
http://www.sitepoint.com/article/advanced-email-php/

KR,
ljubiccica
ASKER CERTIFIED SOLUTION
Avatar of alain34
alain34
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial