Recommendation
We recommend using SMTP with authentication (email address and password) instead of the mail() function to ensure deliverability of your emails. We do not provide support for emails sent with the PHP mail() function.
PHP's mail() function is enabled by default on our web hosting, so you can send emails with your PHP scripts.
By default, no sender is filled in when you use PHP's mail() function, so it is necessary to define it in your script using the additional headers:
<?php
$to = 'recipient@example.com';
$subject = 'Message subject';
$message = 'Message content';
$headers = 'From: sender@example.com';
mail($to, $subject, $message, $headers);
?>
For more details on the use of additional headers for the mail() function, see the official PHP website.
Warning
In case of abuse (SPAM, unprotected forms, etc.) we may disable the mail() function of PHP on your web hosting. Please note that the mail() function must not be used for sending newsletters.