[BlueOnyx:07849] Re: php mail function issue

Chris Gebhardt - VIRTBIZ Internet cobaltfacts at virtbiz.com
Mon Jul 25 17:13:43 -05 2011


Michael Stauber wrote:
> Hi Chris,
> 
>> The problem really 
>> appears to surround the issue of what the sender of the email is.  It 
>> looks to me like "apache" is sending the email, but of course there's no 
>> apache user and you cannot create an apache alias.
> 
> That issue has been around as long as the mail() function has been around:
> 
> You must manually set a (valid!) sender address and pass that info to the mail 
> function. If you don't, then PHP simply assumes "apache at localhost", which of 
> course won't get you anywhere, as Sendmail will reject that sender.
> 
> The "wrong" solution there is to force Apache to use a new default with a 
> working address, which can be done in php.ini. The right solution is to use 
> the mail() function in a way that specifies a working address as sender of the 
> email.
> 
> A yet better method is to not use mail() and to instead use something that has 
> a lot less limitations and allows for more options that actually work.
> 
> See [BlueOnyx:07835], where I posted some examples.

I think I understand what you're saying, but that presents me with an 
issue:  site's (such as WordPress) are configured to work just sending 
mail() "out of the box".   This just happens to be the first time I've 
actually witnessed this behavior on a BlueOnyx box.  We have plenty of 
others that take a WordPress installation and just run.

While I understand why the "wrong" solution here is wrong, it would also 
be "wrong" to try to force / educate every site owner on the box to use 
WordPress in a way that is different from the vast majority of the 
world's installations.   So how can I make it "right?"

-- 
Chris Gebhardt
VIRTBIZ Internet Services
Access, Web Hosting, Colocation, Dedicated
www.virtbiz.com | toll-free (866) 4 VIRTBIZ



More information about the Blueonyx mailing list