tqla Posted July 4, 2007 Share Posted July 4, 2007 Hi. I am using this bit of code to send an HTML email: //email $to = "$email"; $from = "[email protected]"; $subject = "Reward"; //begin html message $message = <<<EOF <html> <body bgcolor="#DCEEFC"> <center> <b>I want to add the variables in this section!</b> </center> <br><br> </body> </html> EOF; //end of message $headers = "From: $from\r\n"; $headers .= "Content-type: text/html\r\n"; $to = "$to, $from"; // this will send to both emails at the same time. // now lets send the email. mail($to, $subject, $message, $headers); There are two variables that I would like to include in the HTML portion of the email. One is '$firstname' and the other is '$lastName'. I've done it before with plain emails but not with HTML emails. Is there a way to do this? Thanks. Link to comment https://forums.phpfreaks.com/topic/58355-solved-variables-in-an-html-email/ Share on other sites More sharing options...
tqla Posted July 4, 2007 Author Share Posted July 4, 2007 Nevermind. I just did a search here and there are tons of threads on this subject. Link to comment https://forums.phpfreaks.com/topic/58355-solved-variables-in-an-html-email/#findComment-289375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.