1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Use unauthenticated (not recommended) mail from a website
This guide details the sending of e-mail from a website hosted by Infomaniak using the PHP function e-mail() deactivated by default.
Preamble
- Infomaniak strongly advises against using the PHP mail() function to send email from your apps:
- E-mails will be considered unauthenticated and will therefore be subject to limits.
- Their demarcability will be impacted, which may harm your website.
- It is strongly recommended that an authenticated SMTP shipping method be used. for your e-mails from your apps; Infomaniak offers a corresponding service.
Specify shipping address
To ensure that messages leave correctly from your CMS/web application (and avoid a typical error) Could not instantiate mail function
or sender mismatch
) it is necessary to specify a valid address in the Infomaniak-side settings:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on Manage under Advanced Parameters:
- From the tab General, enter an email address existing in the field Sender's e-mail.
- Click the blue button Save:
Reactivate mail function
If you still want to use PHP's mail function, you will need to activate it on each of the sites of your relevant Web Hosting:
- Click here in order to access the management of your product on the Manager Infomaniak (Need help?).
- Click directly on the nameallocated to the product concerned.
- Click on Manage under Advanced Parameters.
- From the tab PHP / Apache, activate the function e-mail:
- Click the blue button Save.
Examples PHP mail()...
... on WordPress
Configure sending the default contact form included with Builder Divi:
- Log in to the WordPress administration table.
- Go to the Divi editor of the page containing the contact form.
- Click on the icon Parameters to set the contact form Divi:
- Under EMAIL, enter the email address that will receive the mailings of the form and save:
- By default when a visitor uses the form to contact you, you will receive an e-mail from
mail@le-nom-de-votre-site
and if you reply, the recipient will automatically be the email address indicated by the visitor when filling in the contact form.
... on Prestashop
Enter the advanced Prestashop settings:
- Specify SMTP mode.
- Come in.
localhost
as a waiter. - Enter the port
25
. - Do not specify any username or password.
...on Joomla
Configure sending emails via PHPmail (not recommended) in Joomla:
- Log in to the administration chart of your Joomla site.
- Go under Configuration then Server.
- Enter NOTHING in the field E-mail of the site:
This unfortunately prevents any sending test via the button for this purpose, but it will work if you set up a contact form on your site. Click on Save Once the box has been left empty.
PHP response address mail()
When sending an email with the PHP mail() function, the return-path
will be registered of the form root@h2web3.infomaniak.ch
e.g. On the other hand, the header Reply-To:
present in the code of your form allows you to specify a valid response address.