If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

Joomla 3.x. How to fix “Could not instantiate mail function” error in contact form

This tutorial shows how to fix “Could not instantiate mail function” error in Joomla.

This is the most common error message if there are any issues sending emails via Joomla. Most likely it appears if your Joomla server does not support php mail() function, though Joomla attempts to send an email. Error message itself does not define the actual reason; there might be several ways to have it resolved. They depend on the server used – either local or live. Let’s check them one by one.

Local server

WAMP, XAMP, MAMP or any other local server might be used for Joomla installation. If the template is installed over one of those, emails won’t be sent, as local hosts don’t have mail server. In this case AcyMailing should be configured manually to use external SMTP server settings instead. However, it might be not working after uploading the site to the live host.

Live server

When Joomla is installed over the live server, the same ‘Could not instantiate mail function’ error sometimes appears when sending mails. First, make sure that SMPT settings are properly configured. Navigate to Site -> Global Configuration -> Server -> Mail Settings. All the fields should be filled in there:

Joomla_3_How_to_fix_Could_not_instantiate_mail_function_error_in_contact_form_1

There might be a few reasons to check:

  1. AcyMailing settings are invalid. Make sure to use correct data under the Components -> AcyMailing -> Configuration -> Mail Configuration section of Joomla admin panel.

  2. Receiver email address can be not valid. In this case, ‘Could not instantiate mail function’ error appears for several subscribers only. It means the message can’t be delivered to the mentioned email address. Subscriber should verify the email address itself.

  3. Special characters in the subject of email. Some servers refuse delivering emails if they contain special characters in the ‘Subject’ field. Make sure to avoid using those. Alternatively, contact your hosting provider for more details and configuration.

  4. Subject line is too long. You won’t be authorized to deliver messages if the subject is too long. It happens due to the server email requirements.

  5. Limit of sent emails is exceeded. Some servers have a limit of emails sent per hour. If the one is exceeded, the server refuses delivering new emails. This means you should wait some time to have an ability sending more ones.

As you can see, most likely this error appears due to the server settings. Therefore, you should contact the hosting provider directly to set up and configure new email account properly. This saves your time to define and resolve the actual reason of the ‘Could not instantiate mail function’ matter.