Websites and scripts often send emails, for example, for a contact form. In order for these emails to be delivered, it needs to be configured how these emails should be sent. Basically, there are two options available:
- Email delivery via the web server
- Email delivery via external mail servers
In principle, such emails should be sent via your own web servers. These are intended for automated delivery and are appropriately configured. When sending via an external mail server, credentials for an email account must be provided and used. This option is only suitable in special cases.
Email delivery via the web server
For delivery via the web server, the mail service installed there is used. Most CMS and scripts are already designed for this and therefore do not require further configuration. This mail option is often described in the configuration as sending via "PHP" or "Sendmail".
Email delivery via external mail servers
Delivery via external mail servers occurs via authenticated SMTP and should only be used in exceptional cases. For example, if the domain of the sender's address does not allow sending via other mail servers due to SPF entries.
In this case, please note when configuring the email account for sending that you must use port 587 with STARTTLS. Port 587 is intended for authenticated SMTP (with password). Sending via ports 25 and 465 is not allowed for security reasons.