Wishlist 0 ¥0.00

Joomla doesn’t send messages. Could not instantiate mail function.

In this topic, we will consider common problems with Joomla mail sending.

The most frequent error is  “Could not instantiate mail function.”, also sometimes you don’t get any errors, but messages do not come anyway. Below you will find solutions for these problems, but if you are using SMTP protocol, check this article.

1. Maybe you are configuring the contact us form on the local server. Some local servers like Denver or WAMP don’t send messages by default. After moving your site to the hosting, the problem with mailing will disappear.

2. Messages from your site look suspicious for mail services.

2a. Check the spam folder and mark emails from the site as “Not spam”, also add sender mail to the address book.

2b. If you don’t find the email in the spam folder, сonfigure sending via SMTP. You can do it in 5 minutes by following instructions. I guess it’s the most simple and trustworthy way.

2c. If you don’t want to use SMTP, create a domain email address (like This email address is being protected from spambots. You need JavaScript enabled to view it.). Open «System->Global configuration» in the top menu, choose tab Server, find “Mail Settings” options and type a new email address in “From email” field. It will increase your site trust level.

2d. Configure SPF or DKIM on your web server.

3.  Problems with PHP Mailer. Joomla has 3 different mailers: PHP Mail, Sendmail, and SMTP. By default is using PHP Mail, below we will tell you how to fix the problem with him.

3a. The most simple way is to change mailer to the Sendmail. Open «System->Global configuration» in the top menu and choose tab Server. Find “Mail Settings” and choose in the “Mailer” drop down “Sendmail” option. Also, you can choose SMTP, read how to use and configure this protocol here.

Joomla doesn't send messages

3b. You can try to fix PHP Mailer. Open :”root/libraries/phpmailer/phpmailer.php” or  “root/libraries/vendor/phpmailer/phpmailer/class.phpmailer.php” for the late versions of Joomla.

Code:
$params = sprintf(‘-f%s’, $this->Sender);

Change to:
$params = sprintf(‘-f%s’);

Or for the earlier versions find:

$params = sprintf(‘-oi -f %s’, $this->Sender);

Probably 707 or 1161 string number. And add below:

$params = ‘ ‘;

Now your code looks like:

if (empty($this->Sender)) {

$params = ‘-oi -f %s';

} else {

$params = sprintf(‘-oi -f %s’, $this->Sender);

$params = ‘ ‘;

}

4. If this methods doesn’t help, maybe the problem is in your hoster. Probably you are using free plan, with blocked or opt-in mailing. Anyway you should write to the hosting support with your problem.

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.