Latest version

Could not instantiate mail function - AcyMailing

A common error but a difficult one to fix without help. Learn how to do it in this article.
This message means that your mail server (the mailing part of your host) failed to send an email.
This is the most common error message you will get if you have trouble sending e-mails using your server and unfortunately, this error message does not tell you how you can solve the issue.
You can find a detailed explanation as to why your mail server failed to send the email in its logs file. You can ask your host for it.
Based on our experience, your mail server can fail to send emails for these reasons:

You are on a local server (using WAMP for example)

This kind of web server does not have a mail server so you can't send e-mails from your local server.
What's the solution? Well, you should configure AcyMailing to use an external SMTP server instead of using the php Mail function to test Acy but you can consider it will work on your live server

Your receiver e-mail address is not valid

Your mail server may refuse to deliver your message if the receiver e-mail address is not a valid one... So if you have this "could not instantiate mail function" for only a few of your subscribers, it may just be because their e-mail address is not valid!

You included a special character in the subject line

Some mail servers will refuse to deliver your message if it contains special characters in the subject such as a quote or a comma or any other kind of special character (ùïä)...
Please create a new Newsletter, specify a standard subject line ("test" for example) and give it a new try.

You included a special character in the sender/receiver information

The same way, some mail server will refuse to deliver your message if the sender information contain special characters.
Please go on the AcyMailing configuration page, turn OFF the option "add Names" and give it a new try.

Your subject line is too long

Some mail server may not authorize you to deliver your message if the subject line is too long...
Change your subject line to a single word to make sure it's not a problem of subjet length.

The bounce address you specified is not accepted by your server

Some servers won't accept to deliver your message if you specify a bounce e-mail address. Others will force you to apply a bounce address which belongs to your own domain...
Please go on the AcyMailing configuration page and leave the bounce address field empty.

You should specify a bounce e-mail address

Just like the previous point, some servers will only deliver messages if you specified a bounce e-mail address belonging to your own domain.
If removing the bounce e-mail address didn't work, you should try to add it again and make sure it's a valid e-mail address belonging to your own domain.

You already sent too many e-mails!

Most of hosting company will allow you send X e-mails per hour. If you go over that limitation, the mail server will refuse to deliver more e-mails and will display this error message. So for example if you successfully sent 480 e-mails and you can't send e-mails any more, then it's probably what happened and you should first wait one hour to deliver more e-mails and also make sure AcyMailing is configured to stay below your sending limitations.

You send multiple parts... and your host does not like it!

Some hosts won't enable you to send multiple parts... That definitely a parameter we recommend you to keep enabled but you should try to turn it OFF to see if that solves the "could not instantiate mail function" issue. You will find this option under the "Mail Configuration" tab on the AcyMailing configuration page.

Your host does not allow attachments

Some hosts will not allow you to send a message with an attachment... so if you have this issue only on Newsletter with attachments, you could turn OFF the option "embed attachments" on the Acy configuration page to make sure Acy will add the file as a link in your message and not as a real attachment.

Still can't make it work?

Well in this case best solution is probably to look for an external sending service such as Sendinblue, Amazon SES, Mailgun ...
They provide with a really nice service and you will easily get rid of all those connexion issues.