Sending mail using PHP

Discussion in 'PHP' started by Kuna, Oct 21, 2009.

  1. #1
    I have that script. But When I got mail I want it to show like this

    1. that thing on left is INFORMATIONS
    [​IMG]



    2. from: Name surname and mail from person who sending that mail
    to: That is OK
    subject: That is OK
    mailed-by: I guess that is ok

    [​IMG]

    my code is
    $headers = "From: $email" . "\r\n" . "Reply-To: $name $surname";
    
    Code (markup):
     
    Kuna, Oct 21, 2009 IP
  2. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    So you're trying to make the word "Informations" show up in the from field?

    You'll need to change your code thusly:

    
    $headers = "From: Informations <$email> " . "\r\n" . "Reply-To: $name $surname";
    
    Code (markup):
     
    organicCyborg, Oct 21, 2009 IP
  3. Kuna

    Kuna Well-Known Member

    Messages:
    426
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    It works, But this doesn't show "Reply-To: $name $surname"
     
    Kuna, Oct 21, 2009 IP
  4. ban me

    ban me Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Means you want to change your display name when a person receives a mail from your php script? Right?
     
    ban me, Oct 21, 2009 IP
  5. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    The "Reply To:" is structure the same way as the "From:".

    "Reply-To: NameYouWantDisplayed <email@address.com>";
     
    organicCyborg, Oct 21, 2009 IP