Page 1 of 1

Mailer scripts

Posted: Mon Mar 08, 2004 6:22 am
by nitroxman
Now I've got my mailer script working, I'm wondering what makes the email come as a plain text style email?

I'm using plenty of html code and all the mails are showing html tags inside the email body.

I want the server to send a HTML email.

Something to do with the ISP's Webserver?

I'm guessing they're extra tags to put in the php file?

Posted: Mon Mar 08, 2004 6:34 am
by malcolmboston
is your mail 'client/software' set up to accept HTML enabled e-mails?

Mailer script is send plain text email instead of html

Posted: Mon Mar 08, 2004 7:02 am
by nitroxman
Well at first I thought there was a wrong setting in Outlook that read all mails as plain text, so I sent it to a hotmail address, and got the same result. I've changed the setting to 'Use MS Word to read Rich Text mails'. No different.

Now I have no idea.

Posted: Mon Mar 08, 2004 7:13 am
by malcolmboston
i dont use the mail() function so these are just stabs in the dark but

i believe you have to send 'headers' with the mail such as PNG blah blah just so it knows what its sending are you sending these?

Posted: Mon Mar 08, 2004 7:19 am
by nitroxman
Err no. This is the end part

Code: Select all

//This sends a confirmation to your visitor
mail($email, $theirSubject, $theirBody,"FROM:".$adminaddress);
	
echo "1"
?>
What sort of things tell it to be a html email?

Posted: Mon Mar 08, 2004 7:20 am
by patrikG
There is a tutorial at http://www.sitepoint.com/article/advanced-email-php

also, you may want to have a look at http://phpmailer.sourceforge.net/
- a very nice mailing class with a straightforward and powerful API.

Posted: Mon Mar 08, 2004 7:21 am
by malcolmboston
i have no idea, like i said i havent used this function as i mainly code on windows, not on my linux box and dont need the hassle of setting up a local mail server on it

theres some items about it
here


edit: lolololol same links :lol:

Posted: Mon Mar 08, 2004 7:28 am
by patrikG
btw: you may want to set the content-type to "text/html", charset to "iso-8859-1" and encoding to "7bit" (see php manual mail function for details).

Thanks

Posted: Mon Mar 08, 2004 7:39 am
by nitroxman
Ok, cheers to all.

I'll have a look.

:P 8O 8O :P