1. Home
  2. E-mail
  3. Sending e-mail trough web-server (php mail)

Sending e-mail trough web-server (php mail)


If you are hosting your website in Zone virtual server and you would like to send emails out from your website, please note, that ports 25, 1025, 1026, 465 and 587 are closed. Hence you can not use smtp.zone.eu server or any other server that is using the aforementioned ports.

To send email out from your website, localhost has to be assigned as SMTP host name and port 25 should be used. Authentication or secure connection (SSL/TLS) is not required. Those values should be assigned as false or none.

Here’s an example of PHP script’s settings:

$mail->Mailer = "smtp"; 
$mail->Host = "localhost";
$mail->Port = "25";
$mail->SMTPSecure = 'none';
$mail->SMTPAuth = false;
A handy tip!

Many external mail service providers like Sendgrid and Mailgun support port nr 2525 to send email out. This port is not closed and can be used freely.

Email limitations

You are allowed to send out one email every five seconds. If you exceed this limit, an automatic block will be applied to your server. To remove this block, please contact our customer support info@zone.ee


When sending out email from your webserver, please make sure that your domain’s SPF record is modified accordingly. Otherwise the email will be marked as spam or won’t be delivered at all.

In case your domain is using only Zone email services, the SPF record should look like this:

v=spf1 a mx include:_spf.zone.eu -all

In case your website is hosted with us, but you are using email services elsewhere, the SPF record should be modified. Adding  include:_spf.zone.eu  to your domain’s SPF record is sufficient. Here’s an example:

v=spf1 ip4: include:_spf.zone.eu -all


To add authenticity to email that are sent from your webserver, you can use DKIM signing in II and III virtual server package. DKIM will add a cryptographic signature to the email, so that the receiving end can be sure that the email was sent out properly and it has not been forged.

To activate DKIM, log in to “My Zone” and choose Web hosting->Email. Further guidelines can be found here.

Changing PHP sendmail_from

By default, the email form your webserver are sent out from webserver’s default email address virtXXX@vserver.zonevs.eu This can be changed with PHP mail() function’s fifth parameter -f.

Te change the default @vserver.zonevs.eu address, log in to “My Zone” and choose Web hosting->Webserver->Main domain settings->Modify–>PHP settings. In the window that opens, change the sendmail_from value to: address@name.ee


Updated on 9. Jul 2020

Was this article helpful?

Related Articles