{"id":2745,"date":"2021-01-14T17:03:48","date_gmt":"2021-01-14T22:03:48","guid":{"rendered":"https:\/\/kb.n0c.com\/?post_type=ht_kb&#038;p=2745"},"modified":"2026-10-07T15:43:02","modified_gmt":"2026-10-07T19:43:02","slug":"sitebuilder-how-to-fix-the-mail-function-returned-false-error","status":"publish","type":"ht_kb","link":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/","title":{"rendered":"How to Fix the &#8220;Mail() function returned false&#8221; Error"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>This article aims to help you with the &#8220;Mail() function returned false&#8221; error, which can appear on the contact page of your site created with the Site Builder tool.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The\u00a0<a href=\"https:\/\/kb.n0c.com\/en\/glossary\/\" data-type=\"URL\" data-id=\"https:\/\/kb.n0c.com\/en\/glossary\/\">Glossary<\/a>\u00a0contains explanations on multiple topics and can be consulted to clarify certain terms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisite<\/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&nbsp;<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\">Make 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\">Fixing the &#8220;Mail() function returned false&#8221; error<\/h2>\n\n\n\n<p>Sometimes the error &#8220;Mail() function returned false&#8221; is displayed at the bottom of the screen.<\/p>\n\n\n\n<p>If this happens, please follow the instructions below:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the side bar menu, select <strong>Settings -&gt; Contact Form<\/strong>.<\/li>\n\n\n\n<li>Enter an email account with the same domain as your hosting in the <strong>To<\/strong> and <strong>From<\/strong> fields (you will be able to redirect your messages to another address in your N0C panel) and click on the green <strong>Publish<\/strong> button to publish the changes:<\/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\/Site_pad_Mail_function_returned_false_EN-1024x269.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"269\" src=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1024x269.png\" alt=\"Simple contact form\" class=\"wp-image-14650\" srcset=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1024x269.png 1024w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-300x79.png 300w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-768x202.png 768w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-50x13.png 50w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1536x403.png 1536w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-2048x537.png 2048w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-60x16.png 60w, https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-100x26.png 100w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Once the changes are published, go to the file manager via the N0C panel and edit the file named &#8220;<strong>contact.php<\/strong>&#8221; (please refer to the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/n0c-filemanager\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Use the File Manager<\/a>).<\/li>\n\n\n\n<li>Enter the following two lines as comments in the code :<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/$headers .= \"Reply-To: \" . (!empty($this-&gt;replyto) ? $this-&gt;replyto : $this-&gt;from) . \"\" . PHP_EOL;<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/$headers .= \"Return-Path: \" . $this-&gt;from . \"\" . PHP_EOL;<\/pre>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Save the changes.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">You will need to do this every time you publish a change with the tool. Therefore, we\u00a0 suggest that you keep a backup copy of the <strong>contact.php<\/strong> file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This procedure is intended to help you with the &#8220;Mail() function returned false&#8221; error, which may appear on the contact page of your site created with SiteBuilder.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[171],"ht-kb-tag":[],"class_list":["post-2745","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-sitebuilder-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Fix the &quot;Mail() function returned false&quot; Error - N0C KB<\/title>\n<meta name=\"description\" content=\"This article aims to help you with the &quot;Mail() function returned false&quot; error, which can appear on the contact page of your site created with the Site Builder tool.\" \/>\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-fix-the-mail-function-returned-false-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Fix the &quot;Mail() function returned false&quot; Error - N0C KB\" \/>\n<meta property=\"og:description\" content=\"This article aims to help you with the &quot;Mail() function returned false&quot; error, which can appear on the contact page of your site created with the Site Builder tool.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/\" \/>\n<meta property=\"og:site_name\" content=\"N0C KB\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-07T19:43:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2462\" \/>\n\t<meta property=\"og:image:height\" content=\"646\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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-fix-the-mail-function-returned-false-error\\\/\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/\",\"name\":\"How to Fix the \\\"Mail() function returned false\\\" Error - N0C KB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Site_pad_Mail_function_returned_false_EN-1024x269.png\",\"datePublished\":\"2021-01-14T22:03:48+00:00\",\"dateModified\":\"2026-10-07T19:43:02+00:00\",\"description\":\"This article aims to help you with the \\\"Mail() function returned false\\\" error, which can appear on the contact page of your site created with the Site Builder tool.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Site_pad_Mail_function_returned_false_EN-1024x269.png\",\"contentUrl\":\"https:\\\/\\\/kb.n0c.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Site_pad_Mail_function_returned_false_EN-1024x269.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\\\/#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 Fix the &#8220;Mail() function returned false&#8221; Error\"}]},{\"@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 Fix the \"Mail() function returned false\" Error - N0C KB","description":"This article aims to help you with the \"Mail() function returned false\" error, which can appear on the contact page of your site created with the Site Builder tool.","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-fix-the-mail-function-returned-false-error\/","og_locale":"en_US","og_type":"article","og_title":"How to Fix the \"Mail() function returned false\" Error - N0C KB","og_description":"This article aims to help you with the \"Mail() function returned false\" error, which can appear on the contact page of your site created with the Site Builder tool.","og_url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/","og_site_name":"N0C KB","article_modified_time":"2026-10-07T19:43:02+00:00","og_image":[{"width":2462,"height":646,"url":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN.png","type":"image\/png"}],"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-fix-the-mail-function-returned-false-error\/","url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/","name":"How to Fix the \"Mail() function returned false\" Error - N0C KB","isPartOf":{"@id":"https:\/\/kb.n0c.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/#primaryimage"},"image":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/#primaryimage"},"thumbnailUrl":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1024x269.png","datePublished":"2021-01-14T22:03:48+00:00","dateModified":"2026-10-07T19:43:02+00:00","description":"This article aims to help you with the \"Mail() function returned false\" error, which can appear on the contact page of your site created with the Site Builder tool.","breadcrumb":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/#primaryimage","url":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1024x269.png","contentUrl":"https:\/\/kb.n0c.com\/wp-content\/uploads\/2024\/02\/Site_pad_Mail_function_returned_false_EN-1024x269.png"},{"@type":"BreadcrumbList","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/sitebuilder-how-to-fix-the-mail-function-returned-false-error\/#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 Fix the &#8220;Mail() function returned false&#8221; Error"}]},{"@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\/2745","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=2745"}],"version-history":[{"count":22,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2745\/revisions"}],"predecessor-version":[{"id":26266,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2745\/revisions\/26266"}],"wp:attachment":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/media?parent=2745"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=2745"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=2745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}