4.9.1. Proper sending mail from site

There are three ways to send mail from a site on hosting:

  • From web server without authorization:
    • Using the PHP mail function.
    • Using sendmail
  • Via SMTP with authorization.

When sending mail, use the correct sender (see Invalid senders):

  • Either select an existing mailbox in site settings (see Outgoing mail) and don't substitute the sender in the "From" field in the script.
  • Either substitute a mailbox of an existing mail domain into the "From" field (the mailbox itself does not have to exist).

Path to sendmail on hosting — /usr/sbin/sendmail.

Use an existing mailbox and credentials to connect to it. Also configure SPF, DKIM, DMARC.

Content

    (1)