“Test mail could not be sent.” or “Could not instantiate mail function” in Joomla Mail Settings sending a test mail.

2 minute read | By Edison

If you are getting the following error “Test mail could not be sent.” or “Could not instantiate mail function.” trying to send a test email from the Joomla Mail Settings, this is because Azure Web Apps don’t support smtp or email service by default. Customers need to configure a third party smtp service and add it to Joomla settings. Joomla Test Email Error 1 You can use SendGrid that is a cloud-based email service and add it to your Joomla site configuration. Please review the following reference to know more about this service. https://azure.microsoft.com/en-us/documentation/articles/store-sendgrid-mobile-services-send-email-scripts

How to create a SendGrid account

Create a SendGrid is easy, you just need to go to Azure portal (http://portal.azure.com) and follow these steps:

  1. Click on “New” button.
  2. Select Marketplace and type for “SendGrid”.
  3. Choose the one that is related to “SendGrid Email Delivery”.
  4. And then clic on “Create” button.
  5. Fill all required files on the form. (Select a pricing tier, contact information, review also the legal terms)

After you set up the SendGrid account, you will see your configurations (username, smtp server, etc). You can use this information to complete Joomla Mail Settings. SendGrid settings

  How to add SendGrid configuration to Joomla Mail Settings Inside the “Global Configuration”, select “Server” tab and select the following settings: 1.- Change the Mailer option to “SMTP” 2.- Type a “From email” sender. 3.- Choose the SMTP Security. For example:

  • You can set SMTP Security to none and use port 25. (SendGrid recommends customers to use port 587 to avoid any rate limiting that your server host may apply.)
  • Or use SMTP Security to SSL and use port 465.

You can find more documentation about SendGrid SMTP Ports in this reference: https://sendgrid.com/docs/Classroom/Basics/Email_Infrastructure/smtp_ports.html Joomla Mail Settings Sending Joomla Test email If everything is working fine, you are going to receive a test email like this: Test email Joomla Check the following references for more information about PHP & SendGrid: