Jump to content

[SOLVED] appending a footer from my form processor to my/recipients email


Recommended Posts

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?

 

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.