Puxley Posted August 25, 2009 Share Posted August 25, 2009 Hi... I'm a Flash person, and don't have much PHP knowledge, but have successfully written a simple flash form to email app, this uses a PHP form processor, all works a doozy, but I'd like to be able to append a mail footer showing my contact details (a bit like a mail signature). I have no idea how to do this cos I'm a newbie, but here is my code for the form processor: <? function parse($valeur){ return stripslashes(nl2br(utf8_decode($valeur))); } $sujetmsg = parse($_POST['sujet']); $nomprenom = parse($_POST['nomprenom']); $mail = parse($_POST['mail']); $message = parse($_POST['msg']); $contentmsg = "<b>Name, Surname: </b>".$nomprenom."<b><br />Mail address: </b>".$mail."<b><br /><br />Message SENT FROM SITE: <br /></b>".$message; //GUEST MAIL INFORMATION///////////////////////////////////////// $sreception = "Thank you for your message"; $creception = "Your message has been sent. I'll reply as soon as I can...<br><br> Thankyou...<br><br>Puxley"; //////MAIL ADDRESS WRITE///////////////////////////////////// $email="me@mydomain.com"; //////MY DOMAIN//////////////////////////////////////// $sujet="Message from Puxley : ".$sujetmsg." "; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "From: ".$mail."\n"; ////////////////////////////////////////////////////////////////7 $headers2 = "MIME-Version: 1.0\n"; $headers2 .= "Content-type: text/html; charset=iso-8859-1\n"; $headers2 .= "From: ".$email."\n"; ///////////////////////////////////////////////////////////////// mail($email,$sujet,$contentmsg,$headers); mail($mail,$sreception,$creception,$headers2); ?> Also is it possible to style the footer? rather than have default fonts etc? Quote Link to comment https://forums.phpfreaks.com/topic/171806-solved-appending-a-footer-from-my-form-processor-to-myrecipients-email/ Share on other sites More sharing options...
ignace Posted August 25, 2009 Share Posted August 25, 2009 Creating a footer is simple you can do it using plain text and prepend a dashed line of 70 characters or using an html e-mail in which I suggest using a table all styles come inline. <table border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="..">..</td> </tr> </tbody> <tfoot> <tr> <td style="..">..</td> </tr> </tfoot> </table> Quote Link to comment https://forums.phpfreaks.com/topic/171806-solved-appending-a-footer-from-my-form-processor-to-myrecipients-email/#findComment-906112 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.