{"id":48636,"date":"2021-03-18T09:40:43","date_gmt":"2021-03-18T09:40:43","guid":{"rendered":"https:\/\/www.awardspace.com\/?p=48636"},"modified":"2024-02-28T12:06:32","modified_gmt":"2024-02-28T12:06:32","slug":"example-contact-form","status":"publish","type":"post","link":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/","title":{"rendered":"Example Contact Form"},"content":{"rendered":"<p>Our servers require SMTP authentication, which in plain English means you will have to use any of your email accounts, created within the Email Manager &gt; Email Accounts section from your control panel.<br \/>\nYou can see the code of an example contact form below(contact.html):<\/p>\n<pre><code>&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;\r\nContact form\r\n&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;center&gt;\r\n&lt;font size=\"5\"&gt;\r\n&lt;b&gt;\r\nContact form\r\n&lt;\/b&gt;\r\n&lt;br&gt;\r\n&lt;br&gt;\r\n&lt;\/font&gt;\r\n&lt;form method=\"POST\" action=\"mailer.php\"&gt;\r\nSubject:\r\n&lt;input type=\"text\" name=\"subject\" size=\"20\"&gt;\r\n&lt;br&gt;\r\n&lt;br&gt;\r\nName:\r\n&lt;input type=\"text\" name=\"name\" size=\"20\"&gt;\r\n&lt;br&gt;\r\n&lt;br&gt;\r\nE-mail:\r\n&lt;input type=\"text\" name=\"email\" size=\"20\"&gt;\r\n&lt;br&gt;\r\n&lt;br&gt;\r\nMessage:&lt;br&gt;\r\n&lt;textarea rows=\"9\" name=\"message\" cols=\"30\"&gt;\r\n&lt;\/textarea&gt;\r\n&lt;br&gt;\r\n&lt;br&gt;\r\n&lt;input type=\"submit\" value=\"Send\" name=\"submit\"&gt;\r\n&lt;\/form&gt;\r\n&lt;\/center&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/code><\/pre>\n<p>To have the form working you will also have to create a file called mailer.php with the below code:<\/p>\n<pre><code>&lt;?php\r\nif(isset($_POST['submit'])) {\r\n$myemail = \"youremail@yourdomain.com\"; Caution: replace youremail@yourdomain.com with a vaild one you created in Email Manager\r\n$subject = $_POST['subject'];\r\n$name = $_POST['name'];\r\n$email = $_POST['email'];\r\n$message = $_POST['message'];\r\n$headers = \"From:Contact Form &lt;$myemail&gt;\\r\\n\";\r\n$headers .= \"Reply-To: $name &lt;$email&gt;\\r\\n\";\r\necho \"Your message has been sent successfully!\";\r\nmail($myemail, $subject, $message, $headers);\r\n} else {\r\necho \"An error occurred during the submission of your message\";\r\n}\r\n?&gt;<\/code><\/pre>\n<p>If you already have a non-working contact form try adding the following variables and check if it works:<\/p>\n<pre><code>$mymail = \"youremail@yourdomain.com\";\r\n$headers = \"From:Contact Form &lt;$myemail&gt;\\r\\n\";\r\n$headers .= \"Reply-To: $name &lt;$email&gt;\\r\\n\";\r\nmail($mymail, $subject, $message ,$headers);<\/code><\/pre>\n<p>NOTE: The Reply-To header could be set with different variables than $email, depending on the contact form itself.<\/p>\n<p>If your contact form already has the $header or $headers variable you will have to add the code with the following change:<\/p>\n<pre><code>$mymail = \"youremail@account.com\";\r\n$headers = \"From:Contact Form &lt;$myemail&gt;\\r\\n\";\r\n$headers .= \"Reply-To: $name &lt;$email&gt;\\r\\n\";\r\nmail($mymail, $subject, $message ,$headers);<\/code><\/pre>\n<p>NOTE: The Reply-To header could be set with different variables than $email, depending on the contact form itself.<\/p>\n<p>If you wish the messages from the contact form to be received in an email box that is not on our servers just replace the $mymail in the mail() function with the email to where the emails should be sent to.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Our servers require SMTP authentication, which in plain English means you will have to use any of your email accounts, created within the Email Manager &gt; Email Accounts section from your control panel. You can see the code of an example contact form below(contact.html): &lt;html&gt; &lt;head&gt; &lt;title&gt; Contact form &lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;center&gt; &lt;font size=&#8221;5&#8243;&gt; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[58],"tags":[],"class_list":["post-48636","post","type-post","status-publish","format-standard","hentry","category-email-management"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Example Contact Form - AwardSpace.com<\/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:\/\/www.awardspace.com\/kb\/example-contact-form\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Example Contact Form - AwardSpace.com\" \/>\n<meta property=\"og:description\" content=\"Our servers require SMTP authentication, which in plain English means you will have to use any of your email accounts, created within the Email Manager &gt; Email Accounts section from your control panel. You can see the code of an example contact form below(contact.html): &lt;html&gt; &lt;head&gt; &lt;title&gt; Contact form &lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;center&gt; &lt;font size=&quot;5&quot;&gt; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\" \/>\n<meta property=\"og:site_name\" content=\"AwardSpace.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/AwardSpace\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-18T09:40:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-28T12:06:32+00:00\" \/>\n<meta name=\"author\" content=\"Lazar Shishmanov, PhD\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@awspace\" \/>\n<meta name=\"twitter:site\" content=\"@awspace\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lazar Shishmanov, PhD\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\"},\"author\":{\"name\":\"Lazar Shishmanov, PhD\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b\"},\"headline\":\"Example Contact Form\",\"datePublished\":\"2021-03-18T09:40:43+00:00\",\"dateModified\":\"2024-02-28T12:06:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\"},\"wordCount\":186,\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"articleSection\":[\"Email Management\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\",\"url\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\",\"name\":\"Example Contact Form - AwardSpace.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.awardspace.com\/#website\"},\"datePublished\":\"2021-03-18T09:40:43+00:00\",\"dateModified\":\"2024-02-28T12:06:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.awardspace.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\/\/www.awardspace.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"F.A.Q.\",\"item\":\"https:\/\/www.awardspace.com\/kb\/f-a-q\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Email Management\",\"item\":\"https:\/\/www.awardspace.com\/kb\/f-a-q\/email-management\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Example Contact Form\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.awardspace.com\/#website\",\"url\":\"https:\/\/www.awardspace.com\/\",\"name\":\"AwardSpace.com\",\"description\":\"Free Web Hosting with PHP, MySQL, Email Sending, No Ads\",\"publisher\":{\"@id\":\"https:\/\/www.awardspace.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.awardspace.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.awardspace.com\/#organization\",\"name\":\"AwardSpace.com\",\"url\":\"https:\/\/www.awardspace.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"contentUrl\":\"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png\",\"width\":1759,\"height\":176,\"caption\":\"AwardSpace.com\"},\"image\":{\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/AwardSpace\/\",\"https:\/\/x.com\/awspace\",\"https:\/\/www.instagram.com\/awardspace\/\",\"https:\/\/www.quora.com\/profile\/Award-Space\",\"https:\/\/www.linkedin.com\/company\/19214384\/\",\"https:\/\/www.reddit.com\/user\/AwardSpace\",\"https:\/\/www.pinterest.com\/awardspace\/\",\"https:\/\/www.youtube.com\/user\/AwardspaceWebHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b\",\"name\":\"Lazar Shishmanov, PhD\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g\",\"caption\":\"Lazar Shishmanov, PhD\"},\"description\":\"Lazar is a marketing specialist with more than ten years of experience in the field, eight of which as part of the marketing department at AwardSpace. Academically, Lazar holds a Bachelor's degree in Public Relations, a Master's degree in Semiotics, Language and Advertising, and is a PhD candidate in Integrated Marketing Communications. You can learn more about Lazar on his personal website.\",\"url\":\"https:\/\/www.awardspace.com\/author\/lazar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Example Contact Form - AwardSpace.com","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:\/\/www.awardspace.com\/kb\/example-contact-form\/","og_locale":"en_US","og_type":"article","og_title":"Example Contact Form - AwardSpace.com","og_description":"Our servers require SMTP authentication, which in plain English means you will have to use any of your email accounts, created within the Email Manager &gt; Email Accounts section from your control panel. You can see the code of an example contact form below(contact.html): &lt;html&gt; &lt;head&gt; &lt;title&gt; Contact form &lt;\/title&gt; &lt;\/head&gt; &lt;body&gt; &lt;center&gt; &lt;font size=\"5\"&gt; [&hellip;]","og_url":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/","og_site_name":"AwardSpace.com","article_publisher":"https:\/\/www.facebook.com\/AwardSpace\/","article_published_time":"2021-03-18T09:40:43+00:00","article_modified_time":"2024-02-28T12:06:32+00:00","author":"Lazar Shishmanov, PhD","twitter_card":"summary_large_image","twitter_creator":"@awspace","twitter_site":"@awspace","twitter_misc":{"Written by":"Lazar Shishmanov, PhD","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#article","isPartOf":{"@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/"},"author":{"name":"Lazar Shishmanov, PhD","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b"},"headline":"Example Contact Form","datePublished":"2021-03-18T09:40:43+00:00","dateModified":"2024-02-28T12:06:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/"},"wordCount":186,"publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"articleSection":["Email Management"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/","url":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/","name":"Example Contact Form - AwardSpace.com","isPartOf":{"@id":"https:\/\/www.awardspace.com\/#website"},"datePublished":"2021-03-18T09:40:43+00:00","dateModified":"2024-02-28T12:06:32+00:00","breadcrumb":{"@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.awardspace.com\/kb\/example-contact-form\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.awardspace.com\/kb\/example-contact-form\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.awardspace.com\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.awardspace.com\/kb\/"},{"@type":"ListItem","position":3,"name":"F.A.Q.","item":"https:\/\/www.awardspace.com\/kb\/f-a-q\/"},{"@type":"ListItem","position":4,"name":"Email Management","item":"https:\/\/www.awardspace.com\/kb\/f-a-q\/email-management\/"},{"@type":"ListItem","position":5,"name":"Example Contact Form"}]},{"@type":"WebSite","@id":"https:\/\/www.awardspace.com\/#website","url":"https:\/\/www.awardspace.com\/","name":"AwardSpace.com","description":"Free Web Hosting with PHP, MySQL, Email Sending, No Ads","publisher":{"@id":"https:\/\/www.awardspace.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.awardspace.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.awardspace.com\/#organization","name":"AwardSpace.com","url":"https:\/\/www.awardspace.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","contentUrl":"https:\/\/www.awardspace.com\/wp-content\/uploads\/2018\/08\/awardspace_logo.png","width":1759,"height":176,"caption":"AwardSpace.com"},"image":{"@id":"https:\/\/www.awardspace.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/AwardSpace\/","https:\/\/x.com\/awspace","https:\/\/www.instagram.com\/awardspace\/","https:\/\/www.quora.com\/profile\/Award-Space","https:\/\/www.linkedin.com\/company\/19214384\/","https:\/\/www.reddit.com\/user\/AwardSpace","https:\/\/www.pinterest.com\/awardspace\/","https:\/\/www.youtube.com\/user\/AwardspaceWebHosting"]},{"@type":"Person","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/13f0961f1cff18623121a6716f08c58b","name":"Lazar Shishmanov, PhD","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.awardspace.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/341ac134090ebf7e8095d20d79485f8652e19c1d00cfef899e40c69ec4ac10cb?s=96&d=mm&r=g","caption":"Lazar Shishmanov, PhD"},"description":"Lazar is a marketing specialist with more than ten years of experience in the field, eight of which as part of the marketing department at AwardSpace. Academically, Lazar holds a Bachelor's degree in Public Relations, a Master's degree in Semiotics, Language and Advertising, and is a PhD candidate in Integrated Marketing Communications. You can learn more about Lazar on his personal website.","url":"https:\/\/www.awardspace.com\/author\/lazar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/48636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/comments?post=48636"}],"version-history":[{"count":0,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/posts\/48636\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/media?parent=48636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/categories?post=48636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.awardspace.com\/wp-json\/wp\/v2\/tags?post=48636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}