Post by Majnoon » Tue Jul 05, 2022 12:03 pm

Hello everyone.
Today i was testing SMTP for my email.
I decided to restrict my incoming email from my server and only allowed outgoing/send emails.
i test sending email from my server to other address and it does send email without any issue.

Only issue happened when i placed an order i got error in my log
[05-Jul-2022 03:46:15 UTC] PHP Fatal error: Uncaught Exception: Error: RCPT TO not accepted from server! in /home/xyz/public_html/system/library/mail/smtp.php:259
To be sure i unrestricted the mail setting and was able to send order related email.

Active Member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by ADD Creative » Tue Jul 05, 2022 4:12 pm

That's an issue with your mail server rejecting the email because it does not allow the To address. Maybe you are trying to send from the wrong address or email account. Check your OpenCart and server settings.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Majnoon » Wed Jul 06, 2022 10:06 pm

I don't think so that this is issue with my mail server.
As i mentioned earlier that when i unrestricted my email (allowed incoming mails) the system was able to send the email.

Active Member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by ADD Creative » Thu Jul 07, 2022 4:59 pm

Unless it's a timeout issue there is nothing OpenCart can do to force your mail server to accept the To address.

You can see the message you mail server is returning by changing line 259 from.

Code: Select all

throw new \Exception('Error: RCPT TO not accepted from server!');
To.

Code: Select all

throw new \Exception('Error: RCPT TO not accepted from server! ' . $reply);

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Majnoon » Fri Jul 08, 2022 6:27 pm

I found the issue.
It is because Opencart use

Code: Select all

		$mail->setTo($this->config->get('config_email'));
			$mail->setFrom($this->config->get('config_email'));	
from same email address so restricting email wont work.

Active Member

Posts

Joined
Fri Feb 05, 2021 8:29 pm

Post by khnaz35 » Sun Jul 10, 2022 2:11 pm

Hi Majnoon,
Rather than restricting your email setting i would suggest you may use following method it might help.
https://www.opencart.com/index.php?rout ... er=khnaz35

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by abdullahTR » Sun Jan 15, 2023 5:07 am

I am having a similar problem, can you help?

viewtopic.php?p=852336

New member

Posts

Joined
Tue May 12, 2020 8:44 pm

Post by khnaz35 » Sun Jan 15, 2023 9:32 am

Kindly stick into one topic if you really needed help here.

Urgent Questions shoot here: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 86 guests