T
T
teoformartel2019-08-03 15:16:53
PHP
teoformartel, 2019-08-03 15:16:53

Why does PHPMailer work locally but not on the server?

So, there is a server (IP 123.456.789.101) (I know that there is no such thing in principle;) with VestaCP. In the latter, an email account has been created.
The site, on the local server of my pack, uses PHPMailer. It connects via SMTP to the server via IP 123.456.789.101 using mail data.
And so, I upload this site to the same server (IP 123.456.789.101). And it doesn't work on the server anymore. According to PHPMailer's debug - it cannot connect to the SMTP server.
I feel like an asshole that the problem is that I am connecting from the server to the same server.
I tried everything - write localhost, ip, domain - but it doesn't work.
Where to drip, tell me please? xd
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton R., 2019-08-03
@anton_reut

Look at the ports on the hosting, maybe your settings are not supported

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question