probs in sending mails

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sumeet
Forum Newbie
Posts: 15
Joined: Mon May 23, 2005 3:55 pm
Location: Hyderabad
Contact:

probs in sending mails

Post by sumeet »

Hi, I m using apache server in linux andtrying sending of mails by mail() in php but the problem is the mails are going into bulk mail on yahoo i guess its becoz yahoo is reading mail frm apache@localhost .. is there any option by which i can avoid redirection of mails in bulk mail by adding something in headers ??
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

You can add the header

Code: Select all

$headers .= 'From: yourname@yourdomain.com' . "\r\n" .
to specify the From Address.
mail()
It does goto the bulk folder if HTML content is added to it.

Code: Select all

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// And message contains a lot of HTML tags.
Post Reply