SMTP Error: Moodle Could Not Connect to the Host

Written by tiesha whatley
  • Share
  • Tweet
  • Share
  • Pin
  • Email
SMTP Error: Moodle Could Not Connect to the Host
Moodle sends out automatic e-mails when users sign up for courses. (e-mail image by makuba from

Moodle is a PHP script that allows you to create online course and classroom environments. When setting up your Moodle settings after installing the program, you assign an e-mail server or SMTP host for sending e-mails to your users, instructors and students. A SMTP error (Could not Connect to Server) arrives when the script tries to send out an e-mail to users and there is something wrong with outgoing mail configurations. Check or add in your SMTP server settings to fix this error.

Skill level:


  1. 1

    Log in to your administrator area of your Moodle site. Go to the folder on your server that has the Moodle installation. If it is installed on the root directory, just go to your website; for example, If it is located in a subfolder, type in the full directory in the address bar of your Web browser; for example, Click on "Login" in the upper left corner. Type in your administrator username and password in the next window and click on "Login." You will automatically be redirected to the administrator area of the website if you have access.

  2. 2

    Click on "Server" and then "Email" in the right-side menu. In the "SMTP hosts" box type in the full name of your SMTP host. The format is usually or For a Gmail account, it is and Yahoo is Check with your web or e-mail hosting company to find out what the full SMTP host is.

  3. 3

    Type in the username and password for the account in "SMTP username" and "SMTP password" boxes. Use the login credentials you usually use to log in to your e-mail account.

  4. 4

    Click "Save Changes" at the bottom of the screen. Click on the "Users" and then "Bulk User Actions." Click on the users you want to send the email to in the "Available Users" list and then click on "Add to Selection." Or, you can click on "Add All" to add all users to the "Selected" list. Click the drop-down arrow at the bottom next to "With selected users..." and then click on "Add/Send Message" to send an e-mail to the users to make sure that the problem is fixed with your SMTP settings.

Tips and warnings

  • Moodle sometimes has problems sending mail from one of the free online e-mail accounts (Gmail, Yahoo, etc.) so you may have to use a different account to fix the error.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.