For Shared Hosting Linux and Managed Server

Starting on 29 January 2024, emails that you send through your IONOS webspace will require a sender address that belongs to a domain of your IONOS contract. Sending with alternative or empty email senders using IONOS servers will no longer be possible as of this date. This affects all scripts, apps, and programs that are used in your webspace.

This article explains what you need to keep in mind about this change.

Please Note

This change is being introduced for your security. Sending emails with alternative or empty email addresses can pose a security risk and lead to other email providers rejecting these emails or classifying them as spam.

Example

Your IONOS contract contains the domain example.com. You installed a script on the associated webspace that sends the content of a contact form to you as an email. You use an email address from Gmail with the ending @gmail.com as the sender address.

As of 29 January 2024, you can only use sender addresses in your script that end in @example.com. Emails with other senders will not be delivered. In this case, the IONOS outgoing mail server (SMTP) server will send the following error code:
Sender address is not allowed

Checking for Possible Issues

Check the settings of your scripts and applications that have to do with sending emails before the deadline on 29 January 2024. These are, for example, the following functions:

  • Reset password
  • Comment notification
  • Contact and feedback form
  • Store order
  • Other contact options (Legal notice, privacy policy)

Please note that administrator emails for apps such as WordPress or store solutions in particular are usually only entered once during installation and then work silently in the background. These email addresses are usually changed in the administration section (backend) of the applications. You may need the respective login details in this case.

What needs to be changed?

For email addresses, enter a sender address that uses a contract domain. It is important that the part after the @ sign in the email address belongs to a domain from your contract. If you have other domains under the same contract number, you can also use these email addresses.

You can open the domain overview of your contract after logging in to your IONOS account and going to Menu > Domains & SSL.

Changes for PHP mail()

When sending with the PHP fuction mail(), make sure in your PHP script that the entered "From" sender address in $headers belongs to the domain of your web hosting contract on which the script is running. You can feely select the entry in “Reply-To”.

Example

<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: john.smith@exampledomain.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>

However, we recommend using the PHPMailer code library instead of mail(), as it offers more secure and flexible functions for sending emails. mail() only offers very basic functions and less control over the sending of emails, which can lead to problems with the delivery.

Changes for PHPMailer

If you send emails with the optional program library PHPMailer, make sure the sender address ($mail->setFrom) in the SMTP configuration of your PHP script uses the same domain as the mailbox that is configured for sending emails ($mail->username).

Example

   […]
   //Server settings
   $mail->isSMTP(); 
   $mail->Host       = 'smtp.ionos.co.uk';
   $mail->SMTPAuth   = true;
   $mail->Username   = 'john.smith@exampledomain.com';
   $mail->Password   = 'secret_password';
   $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
   $mail->Port       = 465;
   $mail->setFrom('john.smith@exampledomain.com', 'Mailer');
   $mail->addAddress('nobody@example.com');
   $mail->addReplyTo('john.smith@exampledomain.com', 'Information');
   […]

Sending Restrictions Due to Having a Large Number of Domains

Have you checked all of your scripts and are using the correct email addresses everywhere, as described in the section "What needs to be changed?" on this page, but you still get the error message "Sender address is not allowed"?

For a few customers who have registered a very large number of domains, there may be restrictions for technical reasons. In this case, please contact your personal consultant or IONOS Customer Support.

I still have questions about the change. Who can I contact?

We will be happy to clarify any questions you may have. After logging in to your IONOS account, click on the speech bubble with the question mark in the top right-hand corner to display all contact options.