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 = "test@test.com"; $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. Quote Link to comment 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. 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.