Messages sent from Moodle can go through either the PHP mail function or through SMTP server connection. In some cases, the PHP mail function may be disabled on the server (Depending on the hosting company) to prevent spammers from sending emails through compromised websites. To work around this, the email can be configured to connect to an SMTP server. An SMTP connection will connect to an email server with login credentials, authenticating the sending email address. This will allow the receiving email address server to accept the email as authenticated. This is good because some email servers do not allow unauthenticated emails to go through to their server. The following steps will explain how to configure the Moodle 2.3 messaging to use SMTP.

Configuring SMTP settings in Moodle

  1. Log into the Moodle Dashboard
  2. smtp-setup-plugin-1-select Navigate to Site administration > Plugins > Message outputs > Email in the settings section.
  3. smtp-setup-plugin-2-smtp On the Email page, configure the SMTP settings. By default Moodle will use the PHP mail function to send emails. If the administrator wants the email to go to a specific SMTP server, Like Gmail or Yahoo, the SMTP configuration settings can be adjusted to allow a different server to be used.

    In this tutorial, a Gmail email address will be used for the SMTP settings. The following fields will need to be configured for the mail to work. Below is an example of a generic Gmail SMTP set up.

    SMTP hosts:
    (The port number must be attached to the Server host name for the port to be used. The standard configuration for the port will follow the hostname:port# format.)

    SMTP security: SSL
    (This setting will vary on the email servers SMTP setting requirements. For Gmail, SSL is required for the connection.)

    SMTP username:
    (The full email address for the username)

    SMTP password: Password for the email address.

    Below is a table with the settings for configuring the email messaging.

    Messaging output / Email
    SMTP hosts The SMTP host is the server the email address connects to. For example, on our servers, the SMTP host will look something like the following:
    mail.yourdomaincom (None) (SSL)
    SMTP security SMTP security will either encrypt the out going email data or not. The SSL setting must match the same type of connection that was used for the SMTP Host name.
    SMTP username This will be the full email address for the email account. Most email service providers require the entire email address for the username.
    SMTP password This is the password for the specific email address that is being set up.
    SMTP session limit This setting can prevent spam coming from the same session on the server. Limiting to 1 will require a new session to be created in order for an email to be set.
    No-reply address The no reply address is what displays in the return email address. This prevents the email address from being replied to by the recipient.
    Character set Allows the Character set to be changed to UTF-8, EUC-JP, GB18030, GB2312, ISO-2022-JP, ISO-8859-1, or SHIFT-JIS.
    Allow user to select character set Enables the users to be able to change the Character set.
    Newline characters in mail This sets the type of character used for Newline characters.

    Once the fields have the correct Email information in them, click Save changes. Now messages sent through Moodle will deliver to the Gmail server as an authenticated user.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Email Address:
Are you a bot?

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2060
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5392

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!