D
D
digorev2016-03-12 21:31:41
Mail server
digorev, 2016-03-12 21:31:41

Using external SMTP on VPS?

Guys, please help me solve the problem with sending emails from the VPS server. In general, the built-in mail() function works properly. SMTP on the server is working properly (I receive / send letters successfully with the mail client), but when it comes to php, which needs to establish a connection with an external smtp (gmail, mail, yandex .. whatever) it doesn’t work. It seems that access to external smtp is closed for php. I do not know in which direction to dig, there is not enough knowledge. Maybe someone faced such a problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2016-03-12
@dimonchik2013

it may be closed,
check - from the console on the VPS, execute telnet 25 smtp.external.com (and other ports)
, of course, before that, connect from home, i.e. then that port is definitely open the
second problem is unresolvable names, unlikely, but still
check - pint -t smtp.external.com

V
Vlad Zhivotnev, 2016-03-13
@inkvizitor68sl

Go through the encrypted smtp port (465).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question