Page 1 of 1
Mail.php issues
Posted: Mon Apr 29, 2013 4:02 am
by fogz
Hi there,
Im receiving the following message when a customer gets notified of an order status:
Warning: mail(/var/log/phpmail.log) [function.mail]: failed to open stream: Permission denied in httpdocs/system/library/mail.php on line 150.
I have checked the permissions and it is set to 777, can anyone advise of what the problem could be?
Many thanks
Re: Mail.php issues
Posted: Mon Apr 29, 2013 10:42 am
by derek412
Have you tried 755 for the perms? Some hosts do not like 777 at all if they use modsecurity.
It sounds like your host is blocking the use of PHP mail (some do due to spam concerns). It may help to contact them.
Re: Mail.php issues
Posted: Mon Apr 29, 2013 10:49 am
by butte
Nowadays seemingly most servers prefer (or take in stride) 755 directories and 644 files, and the old 777 rule is increasingly unusual.
If the php Mail isn't working, note all of your Mail settings, then first set up Smtp instead and try that. If that does not work, then revert to Mail and ask your host's support. The difference will stem partly from server settings entirely outside your own pubic area, and partly from whatever php.ini settings you MIGHT be able to make inside your hosting control panel for your own public area. Host support varies from nonresponsive or useless to altogether helpful.
Re: Mail.php issues
Posted: Wed May 01, 2013 1:41 am
by leelondon
1 down vote accepted
Not totally sure why the base 64 encode is there to be honest. Try using
$header = 'From: ' . $this->sender . ' <' . $this->from . '>' . $this->newline;
Re: Mail.php issues
Posted: Wed May 01, 2013 3:24 am
by butte
If headers were the problem, then the error would have been thrown with reference to them. Encryption is generally intended to be a whole bunch of bits, and that wasn't error-thrown, either. (What "vote"?!)