I've searched the previous posts regarding this matter or similar and tried all the suggested solutions, but have been unable to get things working.
I'm trying to get email functionality working for the store I'm setting up for a client via SMTP. Anyone else having this issue?
Removing the ssl:// or switching it to tls:// gives me the error `Error: EHLO not accepted from server!`. I'm certain I've followed the setup properly, but clearly there is an issue and I'm unable to trace what's going on. Any and all help is greatly appreciated!
I'm on OpenCart version 3.0.3.6, and below are pictures of my configuration and error log.
Opencart store mail settings
Migadu server settings
Nginx error log after submitting contact form
I replaced ssh:// with tls://, and port 465, with 443 and it failed miserably lol.. No route to host
I'm certain ssh:// and the port 465 are right, as at least it connects and it gets past the HELO portion.
Thank you for your suggestion, but it wasn't able to resolve my issue.
Sometimes you need to contact your host, they will occasionally block SMTP connections from scripts.
Also try without the ssl:// or tls:// prefix.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
So I tried port 587 with tls prefix, and I got the same `MAIL FROM not accepted from server!` error as before.
I then removed the prefix, still with port 587, and I got `AUTH LOGIN not accepted from server!` (the email/password combination are correct)
Ensure your DKIM and/or SPF records are setup per the provider as well.
My last guess.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
So go under the store tab in the settings section and see if the email address match that of your SMTP account. Otherwise you need to work with your mail provider and web host, only so much can be debugged from a forum.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
I set the email in the Store tab to match what I had in the Mail tab, and tried again with no ssl or tls prefix, and still using port 587.
I still get `AUTH LOGIN not accepted from server!`
Thanks anyways for your input! I really do appreciate the assistance.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
For.1. Use the ssl:// prefix in the SMTP Hostname and port 465.
This will tell OpenCart/PHP in use Implicit TLS encryption on port 465.
Or.
2. Use the tls:// prefix in the SMTP Hostname and port 587.
This will tell OpenCart/PHP to connect normally to port 587 and use the STARTTLS command to upgrade the connection to a secure one using TLS.
It means the settings you have entered are correct, as this error is only generated after your username and password has been accepted.Notice: Error: MAIL FROM not accepted from server!
What it does mean is that the mail server didn't like your store's email address. Check that your email address in System->Settings->Store (tab)->E-mail matches your email address in System->Settings->Mail (tab)->SMTP Username.
If it does match then you can get more information as to why it was rejected by changing line 242 of system/library/mail/smtp.php from:
Code: Select all
throw new \Exception('Error: MAIL FROM not accepted from server!');
Code: Select all
throw new \Exception('Error: MAIL FROM not accepted from server! ' . $reply);
You must still have the settings wrong or something else has changed, as your previous posts you stated you received the "MAIL FROM not accepted from server!" error, which will only be generated if your details are correct and passed the EHLO test.
With `ssl://smtp.migadu.com` and port `465`, and the emails all matching, I was able to have my contact form send an email properly!ADD Creative wrote: ↑Thu Nov 26, 2020 7:42 amFor SMTP settings.For.1. Use the ssl:// prefix in the SMTP Hostname and port 465.
This will tell OpenCart/PHP in use Implicit TLS encryption on port 465.
Or.
2. Use the tls:// prefix in the SMTP Hostname and port 587.
This will tell OpenCart/PHP to connect normally to port 587 and use the STARTTLS command to upgrade the connection to a secure one using TLS.It means the settings you have entered are correct, as this error is only generated after your username and password has been accepted.Notice: Error: MAIL FROM not accepted from server!
What it does mean is that the mail server didn't like your store's email address. Check that your email address in System->Settings->Store (tab)->E-mail matches your email address in System->Settings->Mail (tab)->SMTP Username.
If it does match then you can get more information as to why it was rejected by changing line 242 of system/library/mail/smtp.php from:To:Code: Select all
throw new \Exception('Error: MAIL FROM not accepted from server!');
Code: Select all
throw new \Exception('Error: MAIL FROM not accepted from server! ' . $reply);
I must still have an issue somewhere however, because updating orders, and checking "notify customer" doesn't email them. There are no errors reported in the logs either.
I owe you all a huge amount of thanks for your help! Happy Thanksgiving to all my neighbors south of us!
Also ensure all events prefixed with mail are enabled under admin->extensions-> events
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
Check in Extensions -> Events that"mail_order_add" is enabled and trigger is "catalog/model/checkout/order/addOrderHistory/before" also that "mail_order_alert" is enabled with a trigger of "catalog/model/checkout/order/addOrderHistory/before".amourinho wrote: ↑Fri Nov 27, 2020 5:13 amWith `ssl://smtp.migadu.com` and port `465`, and the emails all matching, I was able to have my contact form send an email properly!
I must still have an issue somewhere however, because updating orders, and checking "notify customer" doesn't email them. There are no errors reported in the logs either.
I owe you all a huge amount of thanks for your help! Happy Thanksgiving to all my neighbors south of us!
Could be the messages are being treated as spam. Check you have all the SPF and DKIM set up (use an online mail deliverability tool to check). Check your host doesn't run any outgoing mail filters. I'v seen hosts reject this sort of outgoing mail as spam.
ADD Creative your message led me to the issue. My events had only one trigger listed in it, just one for voucher.
I ended up redeploying a new OpenCart store, which had all the event triggers you'd mentioned enabled by default. I ported the products/categories/etc, images, and theme over. Everything appears to be in working order.
Thanks to all who helped, you're all a tremendous asset to this community!
The domain we use is: domainxy.ch.
I have the same error in php_errors.log.
Code: Select all
[27-Jun-2021 18:18:33 UTC] PHP Fatal error: Uncaught Exception: Error: MAIL FROM not accepted from server!
Code: Select all
Jun 27 20:27:20 mail sendmail[28688]: 15RIRKe9028688: ruleset=check_mail, arg1=<domainxy.ch>, relay=somehost.local [10.0.1.1], reject=553 5.5.4 <domainxy.ch>... Domain name required for sender address domainxy.ch
We can not use SMTP AUTHENTICATION to authenticate to our SMTP host (anymore). We where forced to switch to IP based allowed relaying and we was forced to remove the username and password value from "SYSTEM -> SETTINGS -> Email -> SMTP Username and SMTP Password" - after this modification it was working again.
We was forced to change the SMTP settings after an upgrade from 3.0.3.2 to 3.0.3.7. The behaviour between 3.0.3.2 and 3.0.3.7 must have been changed.
It looks like OC uses the value from the "SMTP Username" as the FROM address to send emails and _not_ the configured email address at "SETTINGS -> STORE -> Email" anymore.
To put it back to the way it was / should be. You would need to change in system/library/mail/smtp.php.
Code: Select all
if ($this->verp) {
fputs($handle, 'MAIL FROM: <' . $this->smtp_username . '>XVERP' . "\r\n");
} else {
fputs($handle, 'MAIL FROM: <' . $this->smtp_username . '>' . "\r\n");
}
Code: Select all
if ($this->verp) {
fputs($handle, 'MAIL FROM: <' . $this->from . '>XVERP' . "\r\n");
} else {
fputs($handle, 'MAIL FROM: <' . $this->from . '>' . "\r\n");
}
Users browsing this forum: Bing [Bot] and 512 guests