[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

send webpage from php send mail function

Posted on 2008-11-07
2
Medium Priority
?
890 Views
Last Modified: 2013-12-18
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..
0
Comment
Question by:aihaiai
2 Comments
 
LVL 7

Expert Comment

by:ljubiccica
ID: 22903084
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
0
 
LVL 16

Accepted Solution

by:
alain34 earned 150 total points
ID: 22903094
Hello aihaiai,

Could I ask why you are not using phpmailer for this type of developemt?
http://phpmailer.codeworxtech.com/index.php?pg=phpmailer

Regards,

alain34
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses
Course of the Month19 days, 13 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question