can't send emails!!

can't send emails!!

by peter gee -
Number of replies: 1

Using Moodle 2.9.1+ (Build: 20150716)

I can't seem to send emails using the bulk email functions.  Also if I try to do a bulk change passwords the cron job gives this error:

lib/moodlelib.php email_to_user(): Could not instantiate mail function

I traced this down to class.phpmailer.php::mailPassthru

that uses the php mail command.

To test this on the server i wrote a quick and simple php program to test the mail function and it worked, so it is not a setting problem of the server.

Something is wrong with the header, params that is making mail return FALSE, which is causing the can't instantiate exception.


any ideas on how to trace this one out?



Average of ratings: -
In reply to peter gee

Re: can't send emails!!

by peter gee -

turned out it was caused by the support email being a valid but not a real email address.

the extra parameters -fpete@imac.local was breaking it.