PHP Mail Function

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
EzehM
Forum Newbie
Posts: 1
Joined: Sun Sep 04, 2005 8:55 am

PHP Mail Function

Post by EzehM »

I have used the PHP mail function in a script and any mail sent to Yahoo appears to be filtered and categorised as SPAM. Is there anything I can set to stop this.

Thanks

Milton
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It all comes down to the headers you send, and the content to the message. I'd like to spend my time not having to deal with idiosyncrasies of mail, so I often leave it to something like phpMailer
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

I am designing a mail class and i was reading articles from Zend and the PHP manual.
I could not get more information on additonal parameters in the mail function.
can anyone here explain me what these additonal parameters are and where they are used???
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

I'd advise not too bother too much with PHP's mail function but use PHP Mailer.
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Re: PHP Mail Function

Post by bokehman »

EzehM wrote:I have used the PHP mail function in a script and any mail sent to Yahoo appears to be filtered and categorised as SPAM. Is there anything I can set to stop this.
There are lots of reasons it could be and most are beyond your control if you are on a shared server. It's not just a case of using the right headers in PHP mail() although this is also important also. Just a couple of things for example: if your domain has no postmaster or abuse account, has no SPF record, or it sends an HELO/EHLO the remote server doesnt like. AOL, hotmail, gmail and sourceforge are all very fussy in this respect. Also rejection could be because the mailserver is on a dynamic IP or has no PTR. All the above nothing to do with PHP. The only way to have complete control over your output is to send with fsockopen();
Post Reply