its not a common problem, but i think it deserves a posting
Problem
Mails - password, feedback, whatever - are not sent by the drupal installation 4.5/4.6, but no error occurs
Reason
Some providers have set up a special requirement to use the sendmail function (mostly used by the php mail(); function)
There needs to be a parameter -f + emailadress to successfully send an email through php
Solution
Look into the modules/user.module for function user_mail and this code
return mail(
$mail,
mime_header_encode($subject),
str_replace("\r", '', $message),
"MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header
);
you need to add "-f from@example.com" so it looks like
return mail(
$mail,
mime_header_encode($subject),
str_replace("\r", '', $message),
"MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8; format=flowed\nContent-transfer-encoding: 8Bit\n" . $header,
"-f from@example.com"
);
do not miss the single , behind $header
for the emailaddress you can use whatever valid email you like
There is a small problem with this solution too, ALL emails sent by drupal will get this "from" adress.
If there are enough users with this problem id like to see a feature request for adding additional email parameters.
-micha
work in progress langmi.de
Comments
finaly
finaly I found the answer to my problem, thanks a lot micha.. I'm using drupal 4.7.0 beta6 and I couldn't send/receive mails.. there was no error nothing, and I tried this and now it works!
would like to see a fix in the future, so I don't have to manually change the module whenever I upgrade
___________________
my drupal site: http://www.wi-cn.com - Wireless Computer Networks
I had the same problem... and this fix works.
Also, make sure that the from email address aligns with what your site's actual email address.
Albert
www.ithou.org
and, btw, +1 on a fix to the core, somehow...
For reference, people may read the following below -- correspondence between Siteground.com and myself as we troubleshoot this error:
Note: Siteground changed its mail policy
Now, they only block mails sent with a "from address" from known banks and financial institutions.
Albert
www.ithou.org