1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mail form problem

Discussion in 'PHP' started by outwest77, Jul 15, 2012.

  1. #1
    Hi I have a very simple mail form on a site I am making

    it just has

    Email address

    Very Basic

    It works well and mails the information to me for the new signups, perfectly

    I want to change this so that it can use autoresponder from Gmail

    I want when the customer enters his name email
    he gets an autoresponse from gmail (vacation response)
    saying, welcome to the Site, please now click the following links etc etc

    The problem?
    Gmail auto responder responds to the EMAIL address of emails that it recieves

    When it recieves mails generated from html pages like that, it cannot tell the actual email address to send the auto reply to

    How do I program the page so that the email address that the person submits to me in the form
    is the
    email address that
    gmail replies to with the auto reply
    outwest77, Jul 15, 2012 IP
  2. SoftCloud

    SoftCloud Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    I take it you're using something like:
    mail("blah@blah.com","Email Title","You have been contacted by someone from your site");
    If so, then you can add a header to that and it will show who it's came from.
    mail("blah@blah.com","Email Title","You have been contacted by someone from your site","From: " . $_POST['email']);
    Something along those lines, should work for you. :)
    SoftCloud, Jul 15, 2012 IP
  3. BRUm

    BRUm Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    You will need to add more headers otherwise most email services will put it straight in the spam box.

    http://uk.php.net/manual/en/function.mail.php and read about additional headers.
    BRUm, Jul 21, 2012 IP