Sending e-mails from your site is generally possible. There are a – however – few things to consider.
Beginning March 15, 2022, there will be limits at the outgoing mail servers regarding the e-mail volume of each site. These limits are meant to prevent the abuse of unsecured applications by spammers, or mitigate its impact so that the abuse does not affect the mail utilisation of other users.
The limits are imposed in a way that mails beyond the limit are queued up, until after the passing of a 24-hour period, the quota is restored again. If, for example, the daily limit is reached, the next mails will be held back until the next day. If your site's mail settings are not properly configured, the daily limit is 50 mails. Please note one mail is counted per receipient address (To, CC, BCC).
What you need to observe anyway
These steps are neccessary, even if your site only occasionally sends mails. We strongly recommend these settings, since they reduce the risk of your mails being blocked or labelled as spam.
The most important setting is the sender address (
From header). It must be a valid, working e-mail address. You should be able to actually read the messages sent to this address. Well suited is the e-mail address of the site's functional account configured for forwarding. Do not use addresses from public mail services, or from domains outside of the MWN. Prevent applications or configurations that lead to insertion of arbitrary addresses from user input as
From header. If you do not configure anything, your mail is sent with an automatically generated, invalid sender address. This already causes some mail services to reject your mail right away.
The same address should be used for the
Envelope-from, unless it is another working e-mail address. This
Envelope-from address will receive notifications of problems that occurred during the transport.
Envelope-from address is termed different by different applications: Return-Path, Sender, Envelope Sender, etc. Often, there is an option to use the same address for both sender addresses.
What you need to do to send more e-mails
These steps are neccessary to increase your mail limit.
Your sender addresses (
Envelope-from) must be set as decribed above. If this requirement is met, the limit is automatically set to 250 mails per 24 hours.
You can request a further increase in resonable cases: Create an incident with service 'Webhosting'. Use the variant Selfservice – the one with login. This serves as prove of your permission. The ID of the functional account should be selectable as an option in Affected login. Please also provide the domain name of your site, the sender address that you use, and of course the new limit you want.
Configuration for different use cases
You can use PHP's
mail() function to send e-mails. The
From header can be set using the parameter
Envelope-sender has to be set via
additional_params and "-f absenderadresse" (see "Example #4 Sending mail with an additional command line parameter.").
PHP with framework
if you use a framework, configuration of e-mail parameters should be described in the framework's documentation. Many frameworks use PHPMailer, where the property
$Sender can be set.
Wordpress with "WP Mail SMTP"
See https://wpmailsmtp.com/docs/how-to-set-up-the-other-smtp-mailer-in-wp-mail-smtp/. Insert your sender address at the From Email field and activate the option Force From Email. Also activate the option Set the return-path to match the From Email.