Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Use unauthenticated (not recommended) email sending from a website

This guide details sending emails from a website hosted by Infomaniak using the PHP function mail() which is disabled by default.

 

Preamble

  • Infomaniak strongly discourages the use of the PHP mail() function for sending emails from your applications:
    • The emails will be considered as “unauthenticated” and will therefore be subject to limits.
    • Their deliverability will be affected, which can harm your website.
  • It is strongly recommended to use an authenticated SMTP sending method for your email sends from your applications; Infomaniak offers a corresponding service.

 

Specify the sender's address

For messages to be sent correctly from your CMS/web application (and avoid an error such as Could not instantiate mail function or sender mismatch) it is necessary to specify a valid address in the site parameters on the Infomaniak side:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on Manage under Advanced settings:
  4. From the General tab, enter an existing email address in the Sender email field.
  5. Click on the blue Save button:

 

Re-enable the mail function

If you still want to use the PHP mail function, you will need to enable it on each of the sites of your Web Hosting concerned:

  1. Click here to access the management of your product on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product concerned.
  3. Click on Manage under Advanced settings.
  4. From the PHP / Apache tab, enable the mail function:
  5. Click on the blue Save button.

 

PHP mail() examples...

 

...on WordPress

Configure the sending of the default contact form included with Divi Builder:

  1. Log in to the WordPress admin dashboard.
  2. Go to the Divi editor of the page containing the contact form.
  3. Click on the Settings icon to configure the Divi contact form:
  4. Under EMAIL, enter the email address that will receive the form submissions and save:
  5. By default, when a visitor uses the form to contact you, you will receive an email from mail@your-site-name and if you reply, the recipient will automatically be the email address indicated by the visitor when filling out the contact form.

 

... on Prestashop

Go to Prestashop's advanced settings:

  1. Specify the SMTP mode.
  2. Enter localhost as the server.
  3. Enter port 25.
  4. Do not specify a username or password.

 

... on Joomla

Configure email sending via PHPmail (not recommended) in Joomla:

  1. Log in to the admin dashboard of your Joomla site.
  2. Go to Configuration then Server.
  3. Do not enter ANYTHING in the Site Email field:

This unfortunately prevents any test sending via the button for this purpose, but it will work if you configure a contact form on your site. Click on Save once the box is left empty.

 

PHP mail() reply address

When sending an email with PHP's mail() function, the return-path will be written in the form root@h2web3.infomaniak.ch for example. However, the header Reply-To: present in the code of your form allows you to specify a valid reply address.


Has this FAQ been helpful?