Bobcares

“Error: RCPT TO not accepted from server!” – Opencart Experts explain

by | Nov 2, 2018

Large store owners use SMTP mail function to improve mail delivery rate and avoid spam problems.

This function works well in most sites, but sometimes, it conflicts with the server configuration and results in an error.

Error: RCPT TO not accepted from server! in system/library/mail.php” is one such reported problem by Opencart store owners when sending message from contact forms or feedback forms.

As a part of our Support Engineers for webhosts, we routinely solve such errors faced by website owners.

Today, let’s discuss the top 2 causes for this error and how we fix it.

“error: rcpt to not accepted from server!” – Reasons and Fixes

Let’s see the top 2 reasons for this error.

1) Incorrect SMTP settings in Opencart

Store owners use SMTP feature to send emails, much like an email client. We have seen cases where incorrect settings like SMTP hostname, username, protocol or port can hinder the server from connecting to the SMTP server.

 

How to fix?

We verify the following SMTP settings in Opencart panel and confirm the connectivity to SMTP host using the telnet command.

Mail Protocol : SMTP
SMTP Hostname : Address of SMTP host. Include the protocol also(ssl://smtp.gmail.com).
SMTP Username : Email address of SMTP host.
SMTP Password : Email account password.
SMTP Port : The port number provided by SMTP host.
SMTP Timeout : Timeout provided by SMTP host.

If we notice any issues, we quickly correct the SMTP settings.

2. Security restriction in servers

We see email providers use a security feature called SPF(Sender Policy Framework) to check the email authenticity of the sender.

It decides the servers that can send emails on behalf of a domain.

When emails don’t originate from the servers mentioned in the SPF record of the domain, mail server assumes it as fraud and rejects them.

As per Opencart algorithm, when client puts his contact email address(so that store owner can reply to him via this email) say test@gmail.com, Opencart system automatically assigns this email address as the FROM address of the message.

Consequently, the receiver end sees an email claiming to be FROM gmail.com, which is actually from a completely different server. Hence, it fails the SPF check process and mail bounces with the above error.

How to fix?

The right solution we suggest is to modify the Opencart contact form module.

It’s a quick fix as we need to edit a few lines. As a precaution, we always take a backup of the files before editing them.

1. Open the file catalog/controller/information/contact.php

2. Change the FROM field in the contact form to be same as store’s email address by modifying the line as below.

$mail->setFrom($this->config->get('config_email'));

3. Change the Sender address as store’s email address by modifying the line as below.

$mail->setSender($this->config->get('config_email'));

4. Set the client’s email given in the contact form as Reply-to email by modifying the below line.

$mail->setReplyTo($this->request->post['email']);

Conclusion

“Error: RCPT TO not accepted from server!” can occur due to incorrect SMTP settings in Opencart or security restrictions in the server. Today, we’ve seen how our Support Engineers fix this issue.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

1 Comment

  1. Tiago Pastorello

    Wow!! Thank you very much. Saved my day!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF