Email being sent to bulk folder

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
jtc970
Forum Commoner
Posts: 38
Joined: Sun Jan 18, 2004 11:49 pm

Email being sent to bulk folder

Post by jtc970 »

I wrote a 'Tell a friend" script that emails a friend a link to the page you are on. the problem is with Yahoo mail it goes to the Bulk folder.

Is there something I am missing, maybe in the header, to cause this?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Umm...well what headers are you using at the moment? You can always add:

Code: Select all

MIME-Version 1.0
Content-Type: text/html; charset=iso-8859-1
From: name <me@name.com>
X-Mailer: My personal site
Other than those sorts of things you just have to not have the email look like spam. Make sure the address that sends it is from a valid domain name, and that the IP you send the email from is related to that domain name. Try to avoid using keywords that maybe related to spam.

If all that doesnt work, then you just have to tell the person to flag it as non-spam.
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post by AGISB »

If you mail using the mail() function you have a problem.

mail() sends the mail to sendmail and sendmail relays the mail. Because sendmail relays the mail it gives it a new address. This new address is != the one you send from and the mail goes to the spam folder.

You can solve this giving mail() another parameter (see mail() instructions) but this gives a warning message in the mail header.

The best solution is to install a php mail handler like phpmailer
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

I have came across this problem before. The headers are the problem. Go with kettle_drums advice.
Post Reply