Installation help

 
 
Picture of Jade Tippett
Problems setting up e-mail
 
I have set up Moodle 1.6.4 on a Windows 2003 server using the XAMPP package. Everything works fine except the e-mail. Chron is running using the Task Scheduler. I have classes created with forums, students enjoy it, but the e-mail piece is still not working.

I started Mercury Mail and enabled it as a service using the XAMPP control panel, gave Moodle a user name and password in Mercury Mail, set the mail variables in Moodle to "localhost" and the moodle user name and password I created.

I am still getting errors, "ERROR: SMTP Error: Could not connect to SMTP host." in the error log, and no entries in the Mercury Mail activity log.

What am I missing here? Has anyone made this work?

Sorry if this is a redundant question. I tried searching the forum posts for Mercury and got too little, and for email and got too much.
 
Average of ratings: -
Picture of Gary Benner
Re: Problems setting up e-mail
 

Hello Jade,

Moodle has a setting called "SMTP Hosts" - you will find this in the Administration Menu, visible only by admins logged in, under the Server | Email menu.

You should set that to the same setting as your "Outgoing Mail Server" that you use for reading email in Outlook, or whatever software you use for reading / sending email outside of Moodle. ( That assumes the Moodle Server is on the same network as your email reader !! )

Moodle then delivers mail to that SMTP Mail Server, which in turn delivers it to the Mail Server of the recipient.

kind regards

Gary 

 

 

 

 

 
Average of ratings: -
Picture of Jade Tippett
Re: Problems setting up e-mail
 
On our network we use a Microsoft Exchange server, not an SMTP server. Teachers can use Outlook or Outlook Express, configured for the Exchange server, or they can use the Exchange Server web male client. There is no POP3 or SMTP service inside the firewall.

I will talk to the tech in charge of the Exchange Server tomorrow about getting SMTP access, but I don't think it's going fly with the admins.

If I could get Moodle to talk to the Mercury Mail server, it could relay mail to the Exchange Server using the mail transfer protocol. That's what I am going for, but so far, I am still getting the error.

So far, in the SMTP Hosts line I have used "localhost," "127.0.0.1," and the domain name of the web server, with no success.
 
Average of ratings: -
Picture of Gary Benner
Re: Problems setting up e-mail
 

HI Jade,

I'm not familiar with Mercury Mail, however a simple peruse of their website indicates that should work. It is after all another good Kiwi product!! <g>

However the proof of the pudding is in the eating, and you're going a little hungry here.

You may need to work out why Mercury is not accepting, or passing on the emails. You may need to get your technical support people to take a look. There could be a security issue (firewall etc) that may need to be sorted.

Whatever it is a localised system issue, and would more than likely require someone to be on site, rather than a general Moodle issue per se. You have done everythng right with respect to Moodle as far as I can tell.

If you are feeling a little technical, you can test the Mercury Mail using a telnet session:

From a command prompt window (DOS) on the server type

telnet 127.0.0.1 25

helo

mail from:me@mydomain.com

rcpt to:you@yourdomain.com

data

Hello world

.

quit

Replace the email addresses as appropriate, and do not forget the single dot on it's own line to terminate the data entry part.

If everything is fine you will have sent an email - no subject line - but that is not important at this stage.

Let us know if this shows any errors.

kind regards

Gary

 

 

 
Average of ratings: -
Picture of Jade Tippett
Re: Problems setting up e-mail
 
I enabled telnet on the server and it works. When I key in "telnet 127.0.0.1" at the prompt, I get a password dialog.

Then I tried the first line of your suggestion: "telnet 127.0.0.1 25." I get an error "could not connect to the host, on port 25: connection failed."

I think Windows 2003 server has port 25 locked down, and I do not know how to open it. In the services list I cannot find a listing for an SMTP service. Mercury Mail is not there either although it is running.

Is it possible to open IIS without crashing into Apache? IIS has an SMTP client. I still want to use Apache for web service, and I am not sure IIS will not step on Apache if it is running. Any thoughts?
 
Average of ratings: -
Picture of Jade Tippett
Re: Problems setting up e-mail: Solved
 
The problem turned out to be caused by Virus Scan 8.0 Enterprise, installed on the server by the school. Virus Scan has a setting to block the propagation of worms and malware through e-mail which uses Port 25. Once that was removed, then the e-mail works fine.

For reference, to sort out whether the problem was within Moodle or elsewhere, I created a small php page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Outbound Mail Test</title>
</head>
<body>
<?php
mail("[myusername]@[myemailserver]","Project Moodle Test","Test content");
echo "mail sent";
?>
</body>
</html>

Adjust the e-mail address in the script to your e-mail address and save this page as mailtest.php in the root directory of the Moodle web server. Call it using your browser address line. This tests the server's php e-mail processes without involving Moodle. After running the tests, check phperror.log in the ...\apache\log directory to see the errors in detail.

If you are using a testing server and have the directive display_errors(on) in you php.ini file, you will see the errors in the page displayed, but this setting is not recommended for production servers.

With this test, I was able to see that my Moodle server was not getting out to the SMTP server. After disabling the "on access scan" in Virus Scan, I tried the test again, and the test e-mail went through.

After our sysadmin turned off the worm blocking setting in Virus Scan, the e-mail works fine with "on access scan" enabled.

Hope this helps out someone else with a similar problem.

--j
 
Average of ratings:Useful (1)
Picture of Matt Gibson relaxing in the Alps
Re: Problems setting up e-mail
 
Hi,

I'm having problems with my email settings too. We use exchange and when I tried the above sequence, It would not accept any non-local address for delivery. Clearly this is a settings issue on the exchange server, but I'm not sure what to ask our sysadmin to change.

Does anyone have any experience of Exchange settings? It works fine via outlook.

Matt
 
Average of ratings: -
Picture of Myrrh Lynn
Re: Problems setting up e-mail
 
I am using Moodle 1.7 in US on Win98SE via broadband. (But I also have an empty 1.8 moodle that I will be testing. I am having the same problem with both of them.)

I am having a LOT of trouble setting up email. This is my very first website as well as first moodle. So, I'm having a MAJOR learning curve.

Please bear with me as I tell my story and then tell me where I'm going wrong:

I contacted a webhost and set up a domain for our school. http://nava.samuelacademy
I installed moodle on that website. http://nava.samuelacademy.com/moodle
I created an admin ID and gave him this email address: admin@nava.samuelacademy.com

I created another user admin2 and gave him this email address: admin2@nava.samuelacademy.com

I then went to the admin page and clicked on Server/Email. It asks me for this:
SMTP hosts and SMTP username and password.

I'm honestly don't know what to put here.

When I set up the website, I was given
POP3 server: mail.supremecenter48.com and
SMTP server: mail.supremecenter48.com

I was told that this SMTP server required authenication.
The username and password was the same as the email acct and password.
Meaning,
SMTP username: admin@nava.samuelacademy.com
SMTP password: (this guy's password created in user profile)

When I contacted my webhost to make sure this was right, they said I would have to go through this same process on this admin/Server/Email page for every email address.

BUT THIS DOESN'T MAKE SENSE!

I haven't read ANYWHERE on moodle.org that this admin/Server/Email setup is to be changed for each and every user. I thought, the users created their email accounts and passwords when they created their profiles.

Okay. On with the story...
I did what I was told anyway and configured the Server/Email page for the next email address:
SMTP username: admin2@nava.samuelacademy.com
SMTP password: (this guy's password created in user profile)

Then I tried to send an email from the admin@nava.samuelacademy.com to the admin2@nava.samuelacademy.com
When I go to the Admin profile and click on his email address link OUTLOOK EXPRESS pops up!!

(what the ?!@#$#$%)

Isn't this supposed to be the SMTP Host: mail.supremecenter48.com?!?!

I don't want to use Outlook Express, from my experience with them, they are't good. I want to use SupremeWebMail (thus the SMTP host: mail.supremecenter48.com)

What am I doing wrong? Am I stuck with Outlook Express? If so, how do I get IT to work?!

I'm miserable! sad
 
Average of ratings: -
Picture of Gary Benner
Re: Problems setting up e-mail
 

Hello Samuel,

Welcome to Webmastery!

I hope I can ease a little of the pain.

When you click on email links on a web page, Moodle or otherwise, the computer's configuration determine what to do. Usually it will start up the default Email Client configured on that computer - in your case Outlook.

Moodle is not an Email program. it is a Web application. And it works within the environment of the computer it is being viewed in. Unfortunately I dont know how to make a browser access a webmail client as the default email program. Maybe someone else can help there. But I've never seen it. Browsers make the call, based on what is configured in the computer's operating system.

In the Moodle admin setup, you can set up a "SMTP Host". This is the address of your ISP's mail server, that you would normally configure as your "outgoing mail server" in your email program. Your ISP can help there if you do not know. Moodle uses this mail server to deliver email, and you may need to enter in a user / password ( one only ) so Moodle can send out emails.

NOTE: For everyone to use of the forums etc, you will only need to have one smtp user - as it is only ever  Moodle sending out the email, not the individual user. When your Moodle users reply to messages in Moodle, they should do so within the forum, NOT using their email program. That's why the reply address to Moodle emails defaults to "noreply@*******". So Moodle is always the one to send out the emails. Moodle does not read incoming emails ever.

I hope that helps, and makes you less miserable!!

I'm on a trip for the next day or so, but will check back here as soon as I get back.

kind regards

Gary

 

 

 
Average of ratings: -
Picture of Myrrh Lynn
Re: Problems setting up e-mail
 

Gary,

I HOPE you are a 'computer teacher' (as my students would say.)

I have never heard it explained so well. NOW I understand! (I think.)

So, if Outlook Express is the default on my computer, then I don't have to do anything more than set up an email acct for this moodle with Outlook Express. Is that correct?

As a matter of symantics, should the email address I register with Outlook be something like: samuelacademy@[outlookinfo].net  (basically use the name of the school or should I put something else?

As far as the admin/Server?Email page, then I would basically leave it blank?

Afterall, for the SMTP host, it says that if I leave it blank, the computer will use the default, which is Outlook.

I do know that Outlook does not require authentication. So there's no need to fill in the SMTP username & password fields.

What's left to do, then? Nothing?

(Thanks for the welcome and the help! I hope you have a great trip!)

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Problems setting up e-mail
Group Particularly helpful Moodlers
MS Outlook is NOT a mail server (SMTP host) I'm afraid. To my knowledge, MS does NOT provide a free mail server even on their "server" operating systems. Well not difficult to guess why: they want to sell there monster MS Exchange Server!

This is not the case in the FOSS world. There are dozens of first class mail servers to choose from (sendmail, postfix, qmail, exim, ...).

Anyway since you seem to be locked up in this MS labyrinth the network administrators of the school should provide access to a server. The problem is mainly due to spam, people simply don't open their mail servers to outsiders. So if you don't have one running in the same computer, you should go to your provider.

Do a forum search on smtp host hier. For example this one http://moodle.org/mod/forum/discuss.php?d=39791 or this http://moodle.org/mod/forum/discuss.php?d=63400
 
Average of ratings: -
Picture of Jade Tippett
Re: Problems setting up e-mail
 
Windows Server 2003 has an SMTP server that is part of the Internet Information Services (IIS) module. I use Apache, so I have not experimented with it. XAMPP comes with a mailserver program called Mercury Mail, which can be configured to listen to the "localhost" only, preventing it from becoming a relay station for spam.

I agree with Visvanath that your best first step is to talk with your network admins. Your school may have an SMTP server as part of its email system that you can use.
 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Problems setting up e-mail
Group Particularly helpful Moodlers
> Windows Server 2003 has an SMTP server that is part of the Internet Information Services (IIS) module.

Apparantly MS Windows has a completely different notion of what a server is. In the Unix world wenn we talk about "servers" in the sense of network services, they are programs which continuosly "listen" to the network traffic and react once a request arrives at the port assigend to them.

For example, port 25 for SMTP and port 80 for HTTP. How could one be a part of another is a big question for me.

Not to bother, there are many other things which I don't understand!
 
Average of ratings: -
Picture of Iñaki Arenaza
Re: Problems setting up e-mail
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers
IIS is more than a web server. That's why they call it Internet _Information_ Services, and not Internet Web Services wink

Saludos. Iñaki.
 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Problems setting up e-mail
Group Particularly helpful Moodlers
I stand corrected!

Subha Ratriyak. Visvanath
 
Average of ratings: -
Picture of Paula Churchill
Re: Problems setting up e-mail
 

Hi Cary-

I have something similar to this.  The e-mail is working fine, but many of our schools and yahoo see the e-mail from the moodle server as spam.  I think it is because there is no subject int he subject line.  This is frustrating for new users (especially ones who don't have any control over the filtering of their e-mail) and for course leaders as well.....any suggestions?

Right now our barracuda is blocking all e-mails from a moodle server because there is no subject in the subject line and it  is a duplicate e-maila address coming from a second IP address.

Thanks!

 
Average of ratings: -
Picture of Richard Enison
Re: Problems setting up e-mail
 
PC,

Just the obvious suggestion: Perhaps the Moodle code could be modified so that it actually uses the subject line!

RLE
 
Average of ratings: -