Greenguy's Board

WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses

Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-01-19, 01:50 AM   #1
Flickstah
If something goes wrong at the plant, blame the guy who can't speak English
 
Join Date: Dec 2003
Location: Anaheim, CA
Posts: 35
Send a message via AIM to Flickstah
HTML emails from PHP script?

OK, I've been looking into this for the last few hours and still can't find the answer I'm looking for.

I want to send a rich html email from a php script that gets its list of recipients from an sql database.

I have a script I bought and I'm modifying to send out html emails.

The only info i can find is to use $headers = "Content-type: text/html\r\n";

then how it's called is...

mail($email, $subject, $message, $headers, "From: Naughty Holly Webmaster<flick@naughtyholly.com>\nX-Mailer: PHP/" . phpversion());

but I keep getting errors with the $headers....

Is there any other way I can set the mime type or am I doing something wrong here??

Any help would be great!

-fLIck
Flickstah is offline   Reply With Quote
Old 2004-01-19, 08:01 AM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
I don't have an answer, but it is a very good question.

Maybe download Mojo and see how it does it.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2004-01-19, 04:52 PM   #3
Flickstah
If something goes wrong at the plant, blame the guy who can't speak English
 
Join Date: Dec 2003
Location: Anaheim, CA
Posts: 35
Send a message via AIM to Flickstah
I figured it out.. :)

ok so how I did it was...

$headers= "X-Priority: 1\n";
$headers.= "Content-Type: text/html\n";
$headers.= "From: Naughty Holly Webmaster<flick@naughtyholly.com>\nX-Mailer: PHP/\n";
$headers.= "Return-Path: <flick@naughtyholly.com>\n";

mail($email, $subject, $message, $headers, phpversion());

I had to include all those "$headers" and and move the "from" link up to a header call.

It took an additional 3 hours or so to get that right after trying a bunch of other stuff, but I finally got it working

Thanks for the reply cleo

-fLIck
Flickstah is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:50 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc