Fixing "Could not instantiate mail function."??

July 28, 2015 4.1k views
WordPress DigitalOcean Email

I did a search and couldn’t find this same error, so possibly I could be steered in the right direction by asking..

We use a plugin called Digital Access Pass for Wordpress.

I’m migrating from BlueHost to a Digital Ocean droplet running ubuntu 12.04.

Digital Access Pass has the ability to send out emails with a broadcaster..
these emails are currently Failing

“Failed.Could not instantiate mail function.”

I seen on stack-overflow someone say to run this code.. but I want to know which code I should run and what I need to configure before I actually just start installing things that I possibly dont need.

sudo apt-get install sendmail-bin

This screenshot from DAP may help:

2 Answers


Error message “Could not instantiate mail function” is a common error message when sending emails through PHP via your local server.

This error indicates that you’re sending emails using the local mail exchange and that there’s some issue with your PHP mail() function on your server.

Some hosting providers don’t allow sending emails through PHP mail().

If you get this error message, please contact your hosting provider and confirm with them that you are allowed to send emails through their local server and if they can check the setup for you and configure it correctly for you to send emails through PHP mail() on their server.

I hope this helps you to solve the “Could not instantiate mail function” error message.

Source- Could not instantiate mail function


Have another answer? Share your knowledge.