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 该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。). 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.

提交评论


安全码
刷新

 

自1996年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
 

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088 

QQ:76257322

网站:800188.com

电邮:该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。

微信:用企业微信联系