#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    31
    Rep Power
    17

    Problems with MIME type in mail headers


    I'm going to send a HTML mail. This is the script

    PHP Code:
    $mailheaders "From: \"$mail\" <\"\">\n";
    $mailheaders .= "Reply-To: $email\n\n";
    $mailheaders .= "MIME-Version: 1.0\r\nContent-type: text/html\r\n";
                    
    mail("$mail""HTML mail"$html$mailheaders); 
    But it won't come out as HTML. The mail will display the HTML code as plain text.

    But if I use this script, it will work. But then I won't be able to set whos sending the mail etc.

    PHP Code:
    mail("$mail""HTML mail"$html"MIME-Version: 1.0\r\nContent-type: text/html\r\n"); 
    And I want to send it to multible mail adresses without repeating the mail() function. How can I part the mail adresses?

    Like this?

    mail@domain.com,mail@domain.com

    Any suggestions?
  2. #2
  3. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,643
    Rep Power
    43
    you have to seperate each header element with the new line characters "\r\n". check your code; you have \n\n and \n only.

IMN logo majestic logo threadwatch logo seochat tools logo