Post by oursupersoftware » Fri Apr 11, 2025 2:39 pm

I can't seem to find what mailer OC uses? I've been having issues with OC sending emails with my VPS and email server.

From what I've read online, I should use PHPMailer(). I'm not sure how to test/modify OC to use PHPMailer.

Does anyone know how I can do this?

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by OSWorX » Fri Apr 11, 2025 4:31 pm

oursupersoftware wrote:
Fri Apr 11, 2025 2:39 pm
I can't seem to find what mailer OC uses? I've been having issues with OC sending emails with my VPS and email server.

From what I've read online, I should use PHPMailer(). I'm not sure how to test/modify OC to use PHPMailer.

Does anyone know how I can do this?
And we here shall assume what kind of problems you have?
More information is needed if you really what to get help - unless you provide more details, nobody will be able to help you here.
Please read the Forum Rules before proceeding.

And who is writing where you should use PHPMailer?
And why?

OpenCart has it's own independant mail class.
Reading you other post here, you should know that already: viewtopic.php?t=235471

So why are you posting here again while the other thread is still open?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by oursupersoftware » Fri Apr 11, 2025 5:15 pm

Sorry about the new thread, I wasn't getting any help there.

I have the same issue still (Original Thread).

I have a VPS and then also a separate mail server at the same host (I moved from Shared Hosting). They say my SMTP details are correct and that OC is the problem with sending emails, on the above thread I was told that it's a Email Server issue. I'm at my wits end with this, I have google for the past week for a solution and have come up short since.

I did a bit more research and now I see PHP Mailer is if you don't already have a mail server.

My main problem I'm trying to solve is this error when OC send a email (all emails OC sends):

Code: Select all

PHP Fatal error:  Uncaught Exception: Error: EHLO not accepted from server! 550 Bad HELO - Host impersonating domain name [domainname.com]
I would really appreciate any help/guidance with this issue, do I need to install/configure specific software for OC to send email's with SMTP using credentials from my separate email server/host.

Currently my setup is mydomain.com points to my VPS server (where OC is hosted), and then mail.mydomain.com points to my mail server.

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by OSWorX » Fri Apr 11, 2025 5:51 pm

Well, you have the same problem as in the other thread!
It makes no sense to open 2 different with the same!

Anyway, the message tell you the problem already:
550 Bad HELO - Host impersonating domain name
You did not post since yet which server administration tool you are using (Plesk, cPanel, etc.), but I assume you are using cPanel.
Then you are the one who is responsible for all settings there, especially DNS, MX and other records/settings.
Maybe you search by yourself and read all the answers: https://www.google.com/search?q=550+Bad ... omain+name

So either you are able to solve that problem by yourself, ask your provider or hire a technician you can do it for you.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OSWorX » Fri Apr 11, 2025 6:02 pm

oursupersoftware wrote:
Fri Apr 11, 2025 5:15 pm
I did a bit more research and now I see PHP Mailer is if you don't already have a mail server.
False!
Why?
PHPMailer has nothing todo with your mailserver.
You're mixing apples with pears.

And - as already said! - OpenCart use it's own mail class, you don't need any other (like PHPMailer).
Better to learn how servers are working, and what a mailserver in comparison to other types (like database) is - and what not.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by nonnedelectari » Fri Apr 11, 2025 7:57 pm

oursupersoftware wrote:
Fri Apr 11, 2025 5:15 pm
Sorry about the new thread, I wasn't getting any help there.

I have the same issue still (Original Thread).

I have a VPS and then also a separate mail server at the same host (I moved from Shared Hosting). They say my SMTP details are correct and that OC is the problem with sending emails, on the above thread I was told that it's a Email Server issue. I'm at my wits end with this, I have google for the past week for a solution and have come up short since.

I did a bit more research and now I see PHP Mailer is if you don't already have a mail server.

My main problem I'm trying to solve is this error when OC send a email (all emails OC sends):

Code: Select all

PHP Fatal error:  Uncaught Exception: Error: EHLO not accepted from server! 550 Bad HELO - Host impersonating domain name [domainname.com]
I would really appreciate any help/guidance with this issue, do I need to install/configure specific software for OC to send email's with SMTP using credentials from my separate email server/host.

Currently my setup is mydomain.com points to my VPS server (where OC is hosted), and then mail.mydomain.com points to my mail server.
Did you check what your servername is set to? as in getenv('SERVER_NAME')?
if the reverse dns ip does not match that host name, it will bounce.

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by khnaz35 » Fri Apr 11, 2025 10:34 pm

Which MTA are you running on your VPS? Are you using Postfix, Exim, or something more custom? Also, what distro are you deploying it on — Debian-based, RHEL, or something minimal like Alpine? Curious how you've structured your mail stack — especially around security (SPF, DKIM, DMARC), spam filtering, and user auth.

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

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

Post by oursupersoftware » Mon Apr 14, 2025 2:31 pm

khnaz35 wrote:
Fri Apr 11, 2025 10:34 pm
Which MTA are you running on your VPS? Are you using Postfix, Exim, or something more custom? Also, what distro are you deploying it on — Debian-based, RHEL, or something minimal like Alpine? Curious how you've structured your mail stack — especially around security (SPF, DKIM, DMARC), spam filtering, and user auth.
I tried setting up Postfix but no success. I'm deploying on Ubuntu. My mail server is completely separate from my web server (Ubuntu VPS), my email are hosted by my host in a shared hosting server.

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by oursupersoftware » Mon Apr 14, 2025 2:37 pm

nonnedelectari wrote:
Fri Apr 11, 2025 7:57 pm
oursupersoftware wrote:
Fri Apr 11, 2025 5:15 pm
Sorry about the new thread, I wasn't getting any help there.

I have the same issue still (Original Thread).

I have a VPS and then also a separate mail server at the same host (I moved from Shared Hosting). They say my SMTP details are correct and that OC is the problem with sending emails, on the above thread I was told that it's a Email Server issue. I'm at my wits end with this, I have google for the past week for a solution and have come up short since.

I did a bit more research and now I see PHP Mailer is if you don't already have a mail server.

My main problem I'm trying to solve is this error when OC send a email (all emails OC sends):

Code: Select all

PHP Fatal error:  Uncaught Exception: Error: EHLO not accepted from server! 550 Bad HELO - Host impersonating domain name [domainname.com]
I would really appreciate any help/guidance with this issue, do I need to install/configure specific software for OC to send email's with SMTP using credentials from my separate email server/host.

Currently my setup is mydomain.com points to my VPS server (where OC is hosted), and then mail.mydomain.com points to my mail server.
Did you check what your servername is set to? as in getenv('SERVER_NAME')?
if the reverse dns ip does not match that host name, it will bounce.
My server name is mydomain.com, I assume that might be my problem even though the emails are sent with SMPT using mail.mydomain.com which is a different server.

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by oursupersoftware » Mon Apr 14, 2025 2:41 pm

OSWorX wrote:
Fri Apr 11, 2025 6:02 pm
oursupersoftware wrote:
Fri Apr 11, 2025 5:15 pm
I did a bit more research and now I see PHP Mailer is if you don't already have a mail server.
False!
Why?
PHPMailer has nothing todo with your mailserver.
You're mixing apples with pears.

And - as already said! - OpenCart use it's own mail class, you don't need any other (like PHPMailer).
Better to learn how servers are working, and what a mailserver in comparison to other types (like database) is - and what not.
Thanks for clarifying. I do understand the different types of servers, I just don't know how/what I need to set up to make the Ubuntu VPS web server (with OC) send emails with the shared email hosting.

I feel like I'm missing an important part of the puzzle but I don't know what.

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by ADD Creative » Mon Apr 14, 2025 6:25 pm

As already pointed out, it could be an issue with your SERVER_NAME server setting, so check that first. Could be an issue with the reverse DNS lookup of your domain. Could be a issue in that your mail server is set as being your domain, so is rejection a remote connection from something claiming to be that domain.

www.add-creative.co.uk


Guru Member

Posts

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

Post by oursupersoftware » Tue Apr 15, 2025 2:46 pm

ADD Creative wrote:
Mon Apr 14, 2025 6:25 pm
As already pointed out, it could be an issue with your SERVER_NAME server setting, so check that first. Could be an issue with the reverse DNS lookup of your domain. Could be a issue in that your mail server is set as being your domain, so is rejection a remote connection from something claiming to be that domain.
So I did some digging and found that my domain points to the right IP address e.g:
mydomain.com points to xxx.xxx.xxx.xxx (this is my VPS IP address)
then I checked my mail server:
mail.mydomain.com points to xxx.yyy.yyy.yyy

I also checked what my SERVER_NAME is, and it's mydomain.com
Unfortunately I'm not able to check what SERVER_NAME is on my mail server.

Is it possible for me to PM you my DNS records so you can check if you see something wrong?

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by khnaz35 » Tue Apr 15, 2025 3:27 pm

Drop me email with your smtp settings and temporary mail user .

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

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

Post by ADD Creative » Tue Apr 15, 2025 4:28 pm

oursupersoftware wrote:
Tue Apr 15, 2025 2:46 pm
I also checked what my SERVER_NAME is, and it's mydomain.com
Unfortunately I'm not able to check what SERVER_NAME is on my mail server.
The mail server won't have SERVER_NAME as that's just for web servers. It will just be the mail server configuration. Have you asked whoever hosts you mail server?

www.add-creative.co.uk


Guru Member

Posts

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

Post by oursupersoftware » Wed Apr 16, 2025 2:10 pm

ADD Creative wrote:
Tue Apr 15, 2025 4:28 pm
oursupersoftware wrote:
Tue Apr 15, 2025 2:46 pm
I also checked what my SERVER_NAME is, and it's mydomain.com
Unfortunately I'm not able to check what SERVER_NAME is on my mail server.
The mail server won't have SERVER_NAME as that's just for web servers. It will just be the mail server configuration. Have you asked whoever hosts you mail server?
I have asked my Host of the VPS and Mail Server, and they say it's OpenCart that is not working.

New member

Posts

Joined
Sat Aug 20, 2022 4:49 pm

Post by nonnedelectari » Wed Apr 16, 2025 4:11 pm

oursupersoftware wrote:
Wed Apr 16, 2025 2:10 pm
ADD Creative wrote:
Tue Apr 15, 2025 4:28 pm
oursupersoftware wrote:
Tue Apr 15, 2025 2:46 pm
I also checked what my SERVER_NAME is, and it's mydomain.com
Unfortunately I'm not able to check what SERVER_NAME is on my mail server.
The mail server won't have SERVER_NAME as that's just for web servers. It will just be the mail server configuration. Have you asked whoever hosts you mail server?
I have asked my Host of the VPS and Mail Server, and they say it's OpenCart that is not working.
smtp does a HELO server_name
That mail server you are connecting to may check if your ip address is linked to that server name (domain name)
I am assuming that your server's ip address is not linked to domain "mydomain.com".

So change your server name to what your actual domain is, you do that in https.conf globally with the servername directive or via the virtualhost directives.

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by ADD Creative » Wed Apr 16, 2025 5:57 pm

As a test you could replace the SERVER_NAME with an IP address.

In ssystem/library/mail/smtp.php chang.

Code: Select all

fputs($handle, 'EHLO ' . getenv('SERVER_NAME') . "\r\n");
To.

Code: Select all

fputs($handle, 'EHLO [' . $_SERVER['SERVER_ADDR'] . "]\r\n");

www.add-creative.co.uk


Guru Member

Posts

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

Users browsing this forum: No registered users and 59 guests