Mailversand aus dem Webhosting

Sending e-mails from your site is generally possible. There are – however – a few things to consider, namely correct sender addresses and mail quotas.

What you need to observe in any case: correct sender addresses

 E-mail is using two sender addresses – one in the header of the mail ("Header-From") and one in the envelope of the mail ("Envelope-From"). More information Section "Versand einer E-Mail" in the mail documentation.

  1. 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 allow insertion of arbitrary addresses from user input as From header.
  2. 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. 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. You will not be notified about such failures, as the delivery notification mails are getting lost.

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 error reports generated by mail server inform you directly about delivery problems.

Configuration for different use cases

The 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.

Plain PHP

You can use PHP's  mail() function to send e-mails. The From header can be set using the parameter additional_headers. The 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"

With the plugin WP Mail SMTP the „Other SMPT“ Mailer can be used and set up properly. Enter your sender address as From Email, und check Force From Email. Also check Set the return-path to match the From Email.

Wordpress general

Setting the Envelope-from is the main function of the plugin „Stop WP Emails Going to Spam“.

What you need to consider: Mail quota

Since March 15, 2022, there are 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 it 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 the daily limit is reached, subsequent mails will be held back until the next day.

  1. If your site's mail settings are not properly configured, the daily limit is 50 mails. Please note that one mail is counted per recipient address (To, CC, BCC).
  2. If your sender addresses (Header-from and Envelope-from) are set as decribed above, the limit is automatically set to 250 mails per 24 hours.
  3. You can request a further increase in reasonable 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 site's 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.