{"id":2765,"date":"2021-01-14T20:56:25","date_gmt":"2021-01-15T01:56:25","guid":{"rendered":"https:\/\/kb.n0c.com\/?post_type=ht_kb&#038;p=2765"},"modified":"2025-03-07T12:50:36","modified_gmt":"2025-03-07T17:50:36","slug":"sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp","status":"publish","type":"ht_kb","link":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/","title":{"rendered":"How to Configure a Contact Form with PHP Mail or SMTP"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>This article aims to show you how to configure the contact form settings to use the <strong>SMTP\/PHP<\/strong> server to send emails.<\/p>\n\n\n\n<p>The <strong>PHP Mail<\/strong> function uses your <strong>localhost<\/strong> to send e-mails from the contact form, while the <strong>SMTP<\/strong> function uses a <strong>server<\/strong> to send e-mails from your contact form.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong> <meta charset=\"utf-8\">The&nbsp;<a href=\"https:\/\/kb.n0c.com\/en\/glossary\/\" data-type=\"URL\" data-id=\"https:\/\/kb.n0c.com\/en\/glossary\/\">Glossary<\/a>&nbsp;contains explanations on multiple topics and can be consulted to clarify certain terms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prerequisite<\/strong><\/h2>\n\n\n\n<p>Enter the following address in your web browser&nbsp;: <a href=\"https:\/\/mg.n0c.com\/en\/.\">https:\/\/mg.n0c.com\/en<\/a>.<\/p>\n\n\n\n<p>Open the interface (please see the article\u00a0<a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/creating-a-website-with-sitebuilder\/#:~:text=com\/en\/.-,Step%201%20%E2%80%93%20Open%20the%20Interface%C2%A0,-Choose%20Site%20Builder\" target=\"_blank\" rel=\"noreferrer noopener\">How to Create Web Sites<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong>\u00a0Make sure the tool is configured in English (please see the article\u00a0<a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-change-the-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Change the Language<\/a>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Select the Contact Form Settings<\/h2>\n\n\n\n<p>In the Sidebar menu, select <strong>Settings -&gt; Contact Form<\/strong>, which opens the <strong>Simple Contact Form<\/strong> interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Configure PHP Mail<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make sure that <strong>PHP Mail<\/strong> is selected in the <strong>Mailing Method<\/strong> drop-down list (default option):<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png\"><img loading=\"lazy\" decoding=\"async\" width=\"994\" height=\"1024\" src=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png\" alt=\"\" class=\"wp-image-14702\" srcset=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png 994w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-291x300.png 291w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-768x791.png 768w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-58x60.png 58w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-97x100.png 97w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1.png 1181w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><\/a><\/figure><\/div>\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>You must add the same e-mail in the <strong>To<\/strong> (recipient) and <strong>From<\/strong> (sender) fields. You can enter multiple recipient addresses separated by commas if you wish.<\/li>\n\n\n\n<li>Create a dynamic subject in the <strong>Subject<\/strong> field.<\/li>\n\n\n\n<li>Edit the success message in the <strong>Success message<\/strong> field.<\/li>\n\n\n\n<li>Edit the fail message in the <strong>Fail message<\/strong> field.<\/li>\n\n\n\n<li>Configure the<strong> reCAPTCHA<\/strong> (please refer to the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-add-recaptcha-in-a-contact-form\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Configure the reCAPTCHA for the Contact Form of a Web Site<\/a>).<\/li>\n\n\n\n<li>In the <strong>Allowed File Types<\/strong> field, add the file types to be authorized for downloading via the contact form, separating them by commas (for example, doc,txt,jpg).<\/li>\n\n\n\n<li>Click on the <strong>Save <\/strong>button.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Configure the SMTP Mail<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong> <meta charset=\"utf-8\">If your host does not allow sending mail using the local server, you need to configure SMTP mail.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select <strong>SMTP<\/strong> from the <strong>Mailing Method<\/strong> drop-down list:<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN.png\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"397\" src=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN.png\" alt=\"\" class=\"wp-image-14705\" srcset=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN.png 700w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN-300x170.png 300w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN-50x28.png 50w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN-60x34.png 60w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_SMTP_EN-100x57.png 100w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/figure><\/div>\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>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 (please refer to the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/messaging-management\/#:~:text=features%20(how).-,How%20to%20Configure%20an%20Email%20Account%20with%20a%20Third%20Party%20Software,-You%20can%20choose\" target=\"_blank\" rel=\"noreferrer noopener\">How to Manage Emails Accounts<\/a>) and fill in the following fields:<\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add an SMTP server in the <strong>SMTP Server<\/strong> field (if you use a secure server port, please add <strong>ssl: \/\/<\/strong> before the server domain, as in &#8220;<strong>ssl: \/\/domain.com<\/strong>&#8220;).<\/li>\n\n\n\n<li>Add an SMTP port in the <strong>SMTP Port<\/strong> field.<\/li>\n\n\n\n<li>Add the e-mail as displayed in the <strong>Account settings<\/strong> in the <strong>SMTP Username<\/strong> field.<\/li>\n\n\n\n<li>Add the password for the email account in the <strong>SMTP Password<\/strong> field.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Fill in all the information and click on the <strong>Save<\/strong> button.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This article aims to show you how to configure the contact form to use the SMTP \/ PHP server to send emails.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[171],"ht-kb-tag":[279,176,188,280,230,278,281],"class_list":["post-2765","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-sitebuilder-en","ht_kb_tag-mail-2","ht_kb_tag-n0c-2","ht_kb_tag-php-2","ht_kb_tag-php-mail-2","ht_kb_tag-sitebuilder-2","ht_kb_tag-smtp-2","ht_kb_tag-smtp-mail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Configure a Contact Form with PHP Mail or SMTP - N0C KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Configure a Contact Form with PHP Mail or SMTP - N0C KB\" \/>\n<meta property=\"og:description\" content=\"This article aims to show you how to configure the contact form to use the SMTP \/ PHP server to send emails.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/\" \/>\n<meta property=\"og:site_name\" content=\"N0C KB\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-07T17:50:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/\",\"name\":\"How to Configure a Contact Form with PHP Mail or SMTP - N0C KB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simple_Contact_Form_EN-1-994x1024.png\",\"datePublished\":\"2021-01-15T01:56:25+00:00\",\"dateModified\":\"2025-03-07T17:50:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simple_Contact_Form_EN-1-994x1024.png\",\"contentUrl\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Simple_Contact_Form_EN-1-994x1024.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Configure a Contact Form with PHP Mail or SMTP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/\",\"name\":\"N0C KB\",\"description\":\"Official documentation of the N0C hosting platform\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kb.n0c.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Configure a Contact Form with PHP Mail or SMTP - N0C KB","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/","og_locale":"en_US","og_type":"article","og_title":"How to Configure a Contact Form with PHP Mail or SMTP - N0C KB","og_description":"This article aims to show you how to configure the contact form to use the SMTP \/ PHP server to send emails.","og_url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/","og_site_name":"N0C KB","article_modified_time":"2025-03-07T17:50:36+00:00","og_image":[{"url":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/","url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/","name":"How to Configure a Contact Form with PHP Mail or SMTP - N0C KB","isPartOf":{"@id":"https:\/\/kb.n0c.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/#primaryimage"},"image":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/#primaryimage"},"thumbnailUrl":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png","datePublished":"2021-01-15T01:56:25+00:00","dateModified":"2025-03-07T17:50:36+00:00","breadcrumb":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/#primaryimage","url":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png","contentUrl":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Simple_Contact_Form_EN-1-994x1024.png"},{"@type":"BreadcrumbList","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-configure-a-form-with-php-mail-or-smtp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/kb.n0c.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/kb.n0c.com\/en\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"How to Configure a Contact Form with PHP Mail or SMTP"}]},{"@type":"WebSite","@id":"https:\/\/kb.n0c.com\/#website","url":"https:\/\/kb.n0c.com\/","name":"N0C KB","description":"Official documentation of the N0C hosting platform","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.n0c.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/comments?post=2765"}],"version-history":[{"count":22,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2765\/revisions"}],"predecessor-version":[{"id":19246,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2765\/revisions\/19246"}],"wp:attachment":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/media?parent=2765"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=2765"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=2765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}