1. Home
  2. Site Builder
  3. How to Configure a Contact Form with PHP Mail or SMTP

How to Configure a Contact Form with PHP Mail or SMTP


This article aims to show you how to configure the contact form settings to use the SMTP/PHP server to send emails.

The PHP Mail function uses your localhost to send e-mails from the contact form, while the SMTP function uses a server to send e-mails from your contact form.

Note :The Glossary contains explanations on multiple topics and can be consulted to clarify certain terms.


Enter the following address in your web browser : https://mg.n0c.com/en.

Open the interface (how).

Note : Make sure the tool is configured in English (how).

How to Select the Contact Form Settings

In the Sidebar menu, select Settings -> Contact Form, which opens the Simple Contact Form interface.

How to Configure PHP Mail

  1. Make sure that PHP Mail is selected in the Mailing Method drop-down list (default option):
  1. You must add the same e-mail in the To (recipient) and From (sender) fields. You can enter multiple recipient addresses separated by commas if you wish.
  2. Create a dynamic subject in the Subject field.
  3. Edit the success message in the Success message field.
  4. Edit the fail message in the Fail message field.
  5. Configure the reCAPTCHA (how).
  6. In the Allowed File Types field, add the file types to be authorized for downloading via the contact form, separating them by commas (for example, doc,txt,jpg).
  7. Click on the Save button.

How to Configure the SMTP Mail

Note :If your host does not allow sending mail using the local server, you need to configure SMTP mail.

The way to configure the contact form with SMTP is similar to the one explained above, with the exception of the account settings that you need to provide in addition.

  1. Select SMTP from the Mailing Method drop-down list:
  1. To configure SMTP sending, use one of your e-mail addresses with all the SMTP parameters provided by your host in your N0C control panel (how) and fill in the following fields:
  • Add an SMTP server in the SMTP Server field (if you use a secure server port, please add ssl: // before the server domain, as in “ssl: //domain.com“).
  • Add an SMTP port in the SMTP Port field.
  • Add the e-mail as displayed in the Account settings in the SMTP Username field.
  • Add the password for the email account in the SMTP Password field.
  1. Fill in all the information and click on the Save button.
Updated on February 12, 2024

Related Articles