Problems with Email Functionality

Problems with Email Functionality

gan Jerod Clabaugh -
Number of replies: 3
I am trying to use Moodle as part of a UN Web Developer's Workshop and all the trainers are eager to use this new tool and showcase it for many UN projects interested in Distance Learning.

My problem is that I cannot get the email function to work for forum postings, user registration, etc.

I have Moodle 1.0.5 installed on a RedHat Linux box with PHP 4.2.1.

I have edited as Admin the Configure Variables page and entered 'mail.iwlearn.net' which is our CommuniGate mail server on another machine on the LAN. I have also used its IP address instead (192.168.1.194) and have had no luck getting mail to work. I have also tried just leaving it blank as directed, but to no avail.

The machine on which Moodle is installed has a functioning copy of sendmail.

Any thoughts?

We are getting close to registering students so I need to figure this out soon.

Any help would be greatly appreciated.

Cheers,

Jerod Clabaugh
www.iwlearn.net
Cyfartaledd sgoriau: -
In reply to Jerod Clabaugh

Re: Problems with Email Functionality

gan Martin Dougiamas -
Llun o Core developers Llun o Documentation writers Llun o Moodle HQ Llun o Particularly helpful Moodlers Llun o Plugin developers Llun o Testers
Hi!

If you have sendmail on the same machine then you can just leave the smtphosts variable blank. Moodle will use PHP's default method (which is /usr/sbin/sendmail).

It should then just work, but if it doesn't let me know!

Cheers,
Martin
In reply to Martin Dougiamas

Re: Problems with Email Functionality

gan Nacho S.S. -

Hi.

  I have the same problem about sending mail.

  In my case I use "nullmailer" instead of "sendmail".

  Nullmailer has a sendmail binary at /usr/sbin that emulates real sendmail behavior. Moodle seems to send the message, but finally it never arrives to the recipient. 

  I use "nullmailer-inject" from my Perl scripts without any problem. I have thought that I could solve the problem locating the system call to sendmail and replacing it with my system call to nullmailer. I have found the "mail_to_user()" invocation but I haven't found the subroutine definition. Where should I search for it?  Moodle should rejects an error if sendmail isn't found?

Thanks a lot!!!

 

 

 

 

In reply to Nacho S.S.

Re: Problems with Email Functionality

gan Martin Dougiamas -
Llun o Core developers Llun o Documentation writers Llun o Moodle HQ Llun o Particularly helpful Moodlers Llun o Plugin developers Llun o Testers
The problem is not so much Moodle but the way you have PHP set up on that machine. Look in PHP (ie php.ini) for the sendmail configuration.

You should also check your nullmailer logs to see if there are errors anywhere.

Alternatively, you could try setting smtphosts in Moodle if you have SMTP set up somewhere.