how do i send a link through php mail?

Discussion in 'PHP' started by whiteblue1942, Apr 20, 2008.

  1. #1
    how do i send a link through php mail cuz whenevr i make a link in the mail() function it showws the tags in the email and the hyperlink wont work?
     
    whiteblue1942, Apr 20, 2008 IP
  2. CPURules

    CPURules Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you try just using a URL? If that does not work, you need to add the HTML headers.
     
    CPURules, Apr 20, 2008 IP
  3. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #3
    Putting url directly will not work for some email readers they will show as text


    you will need html headers and use html in body of email

    Regards

    Alex
     
    kmap, Apr 21, 2008 IP
  4. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #4
    You must format the mail with adding specific header, so that the recipient display it as HTML, not a plain text.
     
    xrvel, Apr 21, 2008 IP
  5. CPURules

    CPURules Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Here are the HTML headers, assuming your using $headers to store your mail header info.

    
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    
    PHP:
     
    CPURules, Apr 21, 2008 IP