note 107321 added to function.mail

From: Date: Mon, 30 Jan 2012 22:16:31 +0000
Subject: note 107321 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-185800@lists.php.net to get a copy of this message
I was having delivery issues from this function to Gmail, Yahoo, AOL, etc. I used the notes here to figure that you need to be setting your Return-Path to a valid email to catch bounces. There are two extra delivery gotchas on top of that: 1) The domain in the email used in the -f option in the php.ini sendmail parameter or in the mail() extra parameters field, needs to have a valid SPF record for the domain (in DNS as a "TXT" record type for sure and add an additional "SPF" type record if possible). Why? That's header field being used for spam checks. 2) You should also use a domain key or DKIM. The trick here is that the domain key/DKIM is case sensitive! I used Cpanel to create my domain key which automatically used all lowercase domain names in the key creation. I found when sending email and using a camel case "-f account@MyDomainHere.Com" option, my key was not accepted. However it was accepted when I used "-f account@mydomainhere.com". There are many other factors that can contribute to mail not getting to inboxes, including your own multiple failed testing attempts, so I suggest you consult each site's guidelines and don't ask me for help. These are just the couple technical issues that helped my case. I hope this saves someone some time and headaches... ---- Server IP: 69.147.83.197 Probable Submitter: 66.176.104.100 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/107321 Del: integrated -- https://master.php.net/note/delete/107321/integrated Del: useless -- https://master.php.net/note/delete/107321/useless Del: bad code -- https://master.php.net/note/delete/107321/bad+code Del: spam -- https://master.php.net/note/delete/107321/spam Del: non-english -- https://master.php.net/note/delete/107321/non-english Del: in docs -- https://master.php.net/note/delete/107321/in+docs Del: other reasons-- https://master.php.net/note/delete/107321 Reject -- https://master.php.net/note/reject/107321 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185800) next »