Jump to content

Setting Up "from:" When Sending Form Data To An Email.


designfarmer

Recommended Posts


  •  

     

     

    I am having a big issue pertaining to the From: field when my form data is sent to clients email.

     

    When my clients form is filled out and sent to their email address it is currently showing up as webmaster@... in the From: column of their inbox.

     

    I need it to show the customers (person filling out the form) name or email in the From: section in their inbox instead of webmaster@...

     

    Also, nn automatic "order received" message is sent to the customer once an order is placed. When this message is sent it is also showing up as From: webmaster@...

     

    In this instance I need it to show my clients name or email in the From: field in the customers inbox rather than the webmaster@...

     

    Here is my current code.

     

     

     

    /* Mail Function */

    $to = 'info@indeygo.com';

    $from = 'From: You <info@indeygo.com>';

     

     

    $subject = 'Indeygo Customer Order';

     

     

    // To send HTML mail, the Content-type header must be set

    $headers = 'MIME-Version: 1.0' . "\r\n";

    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

     

    // Additional headers

    $headers .= 'To: InDeyGo <info@indeygo.com>' . "\r\n";

    $headers .= 'From: ' . $from . "\r\n";

     

     

    mail($to, $subject, $message, $headers);

    mail($email, "Thank you for your Order", "You will receive confirmation within 24 hours that your order has been received. If you don't hear from us, please call 1-877-463-3946 to confirm we received your order.\n\nThis is an automatically generated message, please do not reply to it.");

    header("Location: ../thank-you-order.php");

     

     

    Any help would be greatly appreciated.

     

    Thanks.


     

Link to comment
Share on other sites

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.