Click to See Complete Forum and Search --> : Sending HTML emails with PHP?
j_mac
09-18-2002, 12:43 AM
Can you send HTML encoded emails with the PHP mail function?
Actually it would be even better if there was a mail application that could do it. It would need to be for PCs. I need to have some images that are on a web server linked in the email without attaching them. The kind of thing you would get from places like Outpost.com and Amazon.
I remember reading that in order to send an HTML email you needed to change the content type header.
Wancieho
09-18-2002, 06:23 AM
Here you go:
$from = "From: Your name <youremail@yourdomain.com>\r\nReturn-Path:youremail@yourdomain.com \r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset=\"iso-8859-1\"";
mail($to,$subject,$body,$from);
j_mac
09-18-2002, 11:39 AM
Cool.
Is there a program for PCs that can do the same thing?
Wancieho
09-18-2002, 11:47 AM
Not to my knowledge but this is pretty straight forward? :)
Musicman
09-18-2002, 01:42 PM
Hi,
if you want your html mails to reach their destination (and not just some people using only outlook), have a look at these articles
http://www.webmasterbase.com/article.php?pid=24&aid=679
http://www.webmasterbase.com/article.php?pid=82&aid=679
I have found that 99.9 % of incoming html-only mails (especially if they are base64 encoded) are just spam. The remainder comes from scripts whose authors do not know any better
Musicman
Wancieho
09-19-2002, 05:01 AM
Hmmmmmm, Musicman does the way i'm doing it get seen as spam?
Musicman
09-19-2002, 12:16 PM
Hi,
I am using a text-only mail program, so when I get a html-only mail, the program shows two buttons, one to open the browser and one to delete. Which one would you prefer? :)
Musicman
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.