SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy what wrongs!! with this code (mail)

    PHP Code:
    $msg  "Thank you\r\n";
    $msg  .= "Your username is : $do3 \r\n";
    $msg .= "Your password is : ".$newpass."\r\n";
    $headers  "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: ".$email."\r\n";
    $mail =  @mail($email,'Account',$msg,$headers); 
    it's still send as a singel line and \r\n wont work!!!
    any help please.

  2. #2
    SitePoint Guru arunkumar's Avatar
    Join Date
    Jan 2005
    Location
    India:Chennai
    Posts
    827
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use <br> indeed
    Where there is a will there is a way
    ArunKumar

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,258
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    arunkumar is correct. Use \r\n for the headers and <br /> for the text/html message

  4. #4
    SitePoint Enthusiast
    Join Date
    Feb 2005
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you , but i dont want to send it as html , i would like to send text only with
    newline so how can i make it? or i must use <br> in all of them?

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mail() with language accents

    *edited*

    sorry, accidentally posted in your thread


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •