P
P
Pavel2018-02-25 20:06:51
PHP
Pavel, 2018-02-25 20:06:51

How does the phpmail function work?

I want to understand how the phpmail function works. You need to understand the full chain. She after all does not use SMTP.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Boris Syomov, 2018-02-25
@igramnet

It calls the program specified in the sendmail_path directive with the parameters specified there, and sends it the generated letter with text and headers.
Those. its operation requires some kind of mail server that provides a similar interface, and will deliver the message, from exim or postfix, to the simplest msmtp.

O
Oleg, 2018-02-25
@politon

What is incomprehensible?
SMTP is a protocol. Used to send from third-party services with
mail() authorization - php. Built-in function for sending email
sendmail is a mail server.

A
Antonio Solo, 2018-02-25
@solotony

sending mail using the "php method" is not a good way, because your mail goes through all the filters and provider's servers and there is a high probability of letter loss / non-delivery (especially for small providers)
the most "correct" way for today is to send through a large postal service ( Yandex, mail, google), and they, in turn, deliver mail via secure SMTP directly from your php script.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question