php mail FROM address3 users found helpful
I run a shared hosting service where quite a few customers use Concrete5.
Most shared hosting services disable the use of phpmail to prevent spam, but others like myself allow it to be used provided the correct parameters are passed, namely the FROM address has to be specified (note that this is not the same as inserting a FROM address into the email header).
None of my users who were using php mail function were able to send/receive emails in Concrete5. Having done a quick search here there didn't seem to be a solution to this so I'll post what I've found incase it helps other people.
Its a simple change really - open up this file:
Find this line:
$transport = new Zend_Mail_Transport_Sendmail();
Edit it to look like this:
$transport = new Zend_Mail_Transport_Sendmail('[email protected]');
Note the -f followed by the email address with no space inbetween.
And whoala! This allows the system to connect to the mail server using the FROM address specified here.
Note that this is the equivalent of adding the -f parameter to sendmail (which is basically what this is doing) and adding the fifth parameter to the phpmail() function.
Although this uses Zend_Mail, if the concrete5 developers could consider somehow implementing this into a future release it would be great :)