Re: why does a html mail send as text ?
| From: | Bulend Kolay | Date: | Wed, 04 Feb 2009 16:43:36 +0000 |
| Subject: | Re: why does a html mail send as text ? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287616@lists.php.net to get a copy of this message | ||
Thanks to Bastien
I think, I wrote wrong the expression
I have entered the string again as below
$headers .= "From: \"Site Admin\" <no-reply@sitename.com>\n";
the mail comes as html and also server name at from part doesn't appear.
Ok it works. it comes as html, But it comes with servername at From part. That's to say, I get the mail no-reply@sitename.com@full.servername.com How can I conceal the servername at the From part ? Thanks2009/2/4 Bulend Kolay <bmalik@ihlas.net.tr>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpI attached my code Thanks Show your code, but it sounds like maybe the HTML flag is not set.Looking the code quickly, the only thing I do differently is setting the headers: //build the headers $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP\n"; $headers .= "From: \"Site Admin <no-reply@sitename.com>\n"; What mail client are you using? Does it / is it set to accept html mails? -- Bastien Cat, the other other white meatConsider using a class like phpmailer or the mime mail class from phpclasses.org Bastien Sent from my iPod On Feb 4, 2009, at 6:28, "Bulend Kolay" <bmalik@ihlas.net.tr> wrote: I use php-5.2.6 and apache2.2.x on opensuse11I have a file called mailsend.php to send a mail of html format. the server sends the mail form of html format. But I get it as text instead of html. default_mimetype is set as text/html in php.ini file. How can I correct this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php