No email confirmation when the user signs up

No email confirmation when the user signs up

by mark zuber -
Number of replies: 11

I have selected Email-based authentication, but my students are not getting any confirmation email.  I have to confirm users in "Edit user account" to create a user account.  I am using moodle 1.5

Why users are not getting confirmation emails?  Please help.

Mark

Average of ratings: -
In reply to mark zuber

Re: No email confirmation when the user signs up

by Erik Ringmar -
Hi Mark,

Did you ever get a reply to this query?  I have the same problems.

Erik in London
In reply to mark zuber

Re: No email confirmation when the user signs up

by Yassine Raki -
I also have the same problem. When registering users are told to wait for their email in order to confirm their registration, they don't receive it!!
I would be greatful if someone could help with this issue...

Yassine from Ifrane (Morocco)
In reply to mark zuber

Re: No email confirmation when the user signs up

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just a couple of random guesses:

a) have you configured the smtp server variable in moodle and is moodle able to send mail through that server? (the smtp server may have some restrictions due to anti-spam measures, etc.)

b) are moodle cron jobs running periodically on that machine?

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: No email confirmation when the user signs up

by Yassine Raki -

Is it possible to do this without configuring the smtp server?

Im connected through a LAN in the university and I dont have access to the smtp server!!

Thanx

In reply to Yassine Raki

Re: No email confirmation when the user signs up

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need a smtp server to send email. You could use one that is already setup somewhere in your organization, or you could setup your own. The former is obviously preferred if you haven't setup a mail server before.

But you need one.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: No email confirmation when the user signs up

by Yassine Raki -

Im sorry to insist, but normally if connected through a lan we can disable the use of SMTP and use the by default daemon to send emails? I know that the open source e107 allows this.

Do you think it is possible with moodle?

Thanx

Yassine from Ifrane...

In reply to Yassine Raki

Re: No email confirmation when the user signs up

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm not sure what you mean when you say "the by default daemon". Are you running moodle on a Unix/Linux machine? Every Unix machine runs a local mailserver, so you may send emails using that server (perhaps this is what you call "the default daemon", I don't know).

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: No email confirmation when the user signs up

by Yassine Raki -

Yes I'm using a Linux machine (Fedora Core 1), how can I use the local mailserver?

Thanx

Yassine from Ifrane

In reply to Yassine Raki

Re: No email confirmation when the user signs up

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just leave the "smtphosts" variable empty. That will use PHP's default mail function which, in the case of Unix/Linux, uses your local mail server.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: No email confirmation when the user signs up

by Yassine Raki -

I tried this, and still no emails are sent. Moreover, even when an email address is displayed as a link to send email to it, this link is inactive!!

I wouls be greatful if you could tell me more about using my local mail server.

Thanks a lot for yor help..

Regards..

Yassine

In reply to Yassine Raki

Re: No email confirmation when the user signs up

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Let's try step by step smile

1.- Open a console on your Fedora machine (xterm, konsole, whatever).

2.- Execute the following command:
telnet localhost 25
3.- If you get something similar to this:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 bla-bla-bla  more text here ... SMTP maybe more text here
then your local mail server accepts mail via SMTP. Type 'QUIT' and press Enter to close de the connection.

4.- If you get something similar to this:
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
then your mail server doesn't accept mail via SMTP. Maybe it accepts it via the 'sendmail' command (this works even if you are using a mail server other than sendmail, like postfix, exim, etc.)

5.- If your mail server accepted mail via SMTP, let's see if it can deliver it to the rest of the world. You have to type the bold text parts below. The rest is what the server sends you in response to your commands. Please, type it exactly like it's shown below ('<' and '<' included). I will be using the destination address 'elloco_delacolina@yahoo.es' to test this. Please, use an address you can read (to see if the mail arrives there or not wink

$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 barad-dur.escomposlinux.org ESMTP Postfix (Debian/GNU)
HELO test.org

250 barad-dur.escomposlinux.org
MAIL FROM:<your-own-mail-address@your-domain>

250 Ok
RCPT TO:<elloco_delacolina@yahoo.es>

250 Ok
DATA

354 End data with <CR><LF>.<CR><LF>
This is a test message.
.   
<--------- This is a dot ('.') followed by an ENTER
250 Ok: queued as 1AA9FF8014
QUIT

221 Bye
Wait a few minutes and see if there is a new message for the address you typed above. If yes, you have a perfectly working local SMTP server wink If not, we have to find out where did the message go.

You can use the 'mailq' command to show the mailserver queue. This queue holds the sent emails until they are sent to their final destination. If the mail server cannot send them for a know reason, using 'mailq' shows a little message noting the reason (DNS failure, cannot connect to destination server, address unknow, etc.).

6.- If your server didn't accept mail via SMTP in the first place, you can try to send it with something like this (the sendmail command is located at /usr/sbin in my Debian GNU/Linux, it can be located at /usr/lib on other Unices/Linuxes)
$ /usr/sbin/sendmail elloco_delacolina@yahoo.es
This is just some text for the message body
. <---- This is again a dot ('.') followed by an ENTER

Now wait a few minutes and see if the message has arrived or not. If not, see again what 'mailq' tells you.

If your mailserver is able to send emails to outside addresses, then you can configure moodle to use it (via SMTP or not, depending on what your local mail server allows you).

But remember, even if your local mailserver is working correctly (and you have everything correctly setup in moodle), you still have to make sure your moodle cron jobs are running periodically. Because mail is sent from the cron jobs (if Im not mistaken).

Saludos. Iñaki.