E-mail configuration problem...

E-mail configuration problem...

by Koen Wouters -
Number of replies: 2

Hi,

I recently installed Moodle 1.5+ latest stable with fixes.
Everything works fine, execpt for one thing. Sending e-mails is giving me many problems.

When a new user creates an account I get  this error:
ERROR: SMTP Error: Could not connect to SMTP host.


Tried to send you an email but failed!
Not logged in (Log in)

Sometimes (dependant on the settings I get the message Couldn't instantiate e-mail.

I think I tried almost every possible solution:

  1. Dont fill in anything (use standard PHP settings) 
  2. smtp from isp (smtp.xs4all.nl)
  3. own smtp-server on moodle-server
  4. Option 2 and 3 but then on ip-basis
  5. Without firewall (To make sure that's not the problem)
  6. PHP.ini with option 1,2,3 and 4

If anyone has any suggestions on how I could solve this I would glady hear it.
For your information: I'm running Moodle on Windows 2003 with IIS6.0, PhP 4.3.11, MySQL 4.0.24.

Greetings,

Koen Wouters

Average of ratings: -
In reply to Koen Wouters

Re: E-mail configuration problem...

by Matthew Johnson -
At first glance, it sounds like either a DNS or an SMTP configuration problem.  You should first make sure that you can send mail messages to the SMTP server with a basic command line client.  Verify that you receive email messages after they are sent to the SMTP server.  Due to security constraints, most SMTP servers out of the box will not route email messages for just any domain -- this would be an open relay and a target for spammers.

Try a couple of additional troubleshooting steps:

1. From your application server, try pinging the SMTP server by name.

2. From your application server, try pinging the SMTP server by IP address.

3. Try connecting to the SMTP port using Telnet.

    A. Start > cmd > Ok
    B. telnet smtp.somedomain.com 25
    C. You should see something like this on a successful connect:

220 SMTP MAIL Service, Version: blah blah
13 ready

4. Try sending an email message by hand.

    A. telnet smtp.somedomain.com 25
    B.HELO smtp.somedomain.com
    C. MAIL FROM: <bogus@somedomain.com>
    D. RCPT TO: <joe@somedomain.com>
    E. RCPT TO: <bob@somedomain.com>
    F. DATA
    G. From: BOGUS!
    H. To: Somebody
    I. Cc:
    J. Subject: This is the subject
    K.
    L. This is an email message. We like
    M. it a lot.
    N. .
    O. QUIT

NOTE: The terminating character for the data section is "<CRLF>.<CRLF>".  Also, a blank line must follow the email header section for it to be interpreted correctly.

5. Try using a command line email client (such as Bmail from Beyond Logic) to send a test message:

http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

6. If you cannot send email through the SMTP servers that you know about, try contacting your IT department to find out which server is your SMTP Smart Relay host.
In reply to Matthew Johnson

Re: E-mail configuration problem...

by Koen Wouters -

I found the problem....

I'm using McAfee 8.0i Enterprise.
It turns out that McAfee standard blocks all traffic on port 25 except for some defined programs (e.g. Outlook). When I add the process w3wp.exe (IIS) mail from Moodle works fine.

Greetings,

Koen