Changing Reply-To address?

Discussion in 'PHP' started by kutibah, Apr 13, 2006.

  1. #1
    I have a form in which users can type in (from, to, subject, message) to send an email. How is it possible to set up a script so when my PHP processes the form to send an email, the reply-to email is whatever I set it to?
     
    kutibah, Apr 13, 2006 IP
  2. forkqueue

    forkqueue Guest

    Messages:
    401
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When you build the headers, specify the Reply-To: variable.

    Note that depending on the configuration of your mail server, there may be limitations on what you can set this value to.
     
    forkqueue, Apr 13, 2006 IP
  3. kutibah

    kutibah Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was guessing it has something to do with headers but didn't know exactly what to call it. But, Thanks! It works perfectly!
     
    kutibah, Apr 13, 2006 IP
  4. onlyican.com

    onlyican.com Peon

    Messages:
    206
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    A Mail function has the following

    $to = "x@y.com";

    $subject = "This is the Subject";

    $body = "This is the body";

    $headers = "Reply To: email here";
    $headers .= "From: email here";
    //You also need your type of email here, HTM, TXT ect

    then mail($to,$subject, $body, $headers);
     
    onlyican.com, Apr 14, 2006 IP