{"id":677,"date":"2011-08-26T15:35:10","date_gmt":"2011-08-26T15:35:10","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/08\/26\/how-to-set-up-formmail\/"},"modified":"2021-08-16T23:53:16","modified_gmt":"2021-08-17T03:53:16","slug":"how-to-set-up-formmail","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/","title":{"rendered":"How to Set up FormMail"},"content":{"rendered":"<p>In this guide, you can learn how to <strong>set up the NMS FormMail script<\/strong>.<\/p>\n<div class=\"alert alert-success\" role=\"alert\"><b>NOTICE:<\/b> You will need to download the\u00a0<a href=\"https:\/\/nms-cgi.sourceforge.net\/scripts.shtml\" rel=\"noopener\" target=\"_blank\" title=\"Click here to navigate to the nms Project website to download the FormMail script.\">NMS FormMail<\/a> script. Make sure to download the &#8220;<b>compat<\/b>&#8221; package.<\/p>\n<\/div>\n<h2>Set Up FormMail<\/h2>\n<h3>Customize FormMail.pl Script<\/h3>\n<ol class=\"article_list\">\n<li>\n<p>Un-compress the downloaded file and upload the FormMail.pl script to your cgi-bin (you will only need to upload the FormMail.pl file, all other files are documentation).<\/p>\n<\/li>\n<p>The next step is to modify the FormMail.pl that is inside your cgi-bin. There are only two lines that you will need to modify.<\/p>\n<li>\n<p>The first is the\u00a0<b>@referers<\/b> line. Replace everything inside of the parentheses with your domain, once without the www and then a single space and again with the\u00a0www You will need to do this for each domain that you will be sending from. Remember, only one space between each url. The line should look like the example below:<\/p>\n<p>@referers          = qw(example.com www.example.com);<\/p>\n<\/li>\n<li>\n<p>Now, modify the <b>@allow_mail_to<\/b> line. Here you specify any email addresses that the forms will send to. Again, only one space between multiple email addresses. Also, make sure you remove the &#8216;localhost&#8217; entry. The line should look like the example below:<\/p>\n<p>@allow_mail_to     = qw(webmaster@example.com admin@example.com);<\/p>\n<\/li>\n<li>\n<p>Save the FormMail.<\/p>\n<\/li>\n<\/ol>\n<p><\/p>\n<h3>Configure Contact Form<\/h3>\n<ol class=\"article_list\">\n<li> First, point the action of the <i>form<\/i> tag to the FormMail.pl script inside the cgi-bin.<\/p>\n<p><b>Pointing the the contact form to the FormMail.pl<\/b><\/p>\n<p>The following tag is necessary for your contact form to process the values in the form. Copy the code (below) and paste it into your Contact form&#8217;s code.<\/p>\n<p><span class=\"code_block\">&lt;form action=&#8221;https:\/\/www.<i>example.com\/cgi-bin\/FormMail.pl<\/i>&#8221; method=&#8221;post&#8221;&gt;<\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\">\n<p><b>NOTE:<\/b> Be sure to replace <i>example.com<\/i>, with your actual domain name and <i>\/cgi-bin\/FormMail.pl<\/i> with the relative path to the file located on your server.<\/p>\n<\/div>\n<\/li>\n<li>\n<p>Inside of your form you will also need to include a few hidden <i>input<\/i> tags. Copy the code (below) and paste it into your <i>contact form&#8217;s code<\/i>.<\/p>\n<p><b>Add the recipient(s) of the email:<\/b><\/p>\n<p>This tag will configure the form to send to the specified email address(es).<\/p>\n<p><span class=\"code_block\">&lt;input type=&#8221;hidden&#8221; name=&#8221;recipient&#8221; value=&#8221;<i>webmaster@example.com,admin@example.com<\/i>&#8221; \/&gt;<\/span><\/p>\n<div class=\"alert alert-warning\" role=\"alert\">\n<p><b>WARNING:<\/b> Make sure you replace <i>webmaster@example.com,admin@example.com<\/i> with an email address that is specified in your <b>@allow_mail_to<\/b> field of the <strong>FormMail.pl script<\/strong>.<\/p>\n<\/div>\n<p><b>Create the subject of the email:<\/b><\/p>\n<p>This tag tells the form the subject to create the email with.<\/p>\n<p><span class=\"code_block\">&lt;input type=&#8221;hidden&#8221; name=&#8221;subject&#8221; value=&#8221;<i>From the contact form<\/i>&#8221; \/&gt;<\/span><\/p>\n<p><b>Redirecting the page to your own &#8220;Thank You&#8221; page<\/b><\/p>\n<p>This is another optional tag to specify where your users will be redirected to after they click the submit button. If you do not include this they will be directed to a very generic looking page created by the FormMail script.<\/p>\n<p><span class=\"code_block\">&lt;input type=&#8221;hidden&#8221; name=&#8221;redirect&#8221; value=&#8221;https:\/\/www.<i>example.com\/thankyou.html<\/i>&#8221; \/&gt;<\/span><\/p>\n<div class=\"alert alert-info\" role=\"alert\">\n<p><b>NOTE:<\/b> Make sure to replace <i>example.com\/thankyou.html<\/i> with the actual page that you create for redirecting your visitor after a submission is made.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<p><\/p>\n<h3>Change File Permissions<\/h3>\n<div class=\"alert alert-danger\" role=\"alert\"><b>IMPORTANT:<\/b> One last thing that must be performed in order for the FormMail to work is that you must <a href=\"\/support\/\" target=\"_blank\" title=\" Click here to navigate to our guide and learn how to change file permissions using cPanel.\" rel=\"noopener\"><b>set the permissions<\/b><\/a> on the <em>FormMail.pl<\/em> file to <u>755<\/u>.<\/p>\n<\/div>\n<h4>Change Permissions Using cPanel<\/h4>\n<ol class=\"article_list\">\n<li>\n<p>Log into cPanel.<\/p>\n<\/li>\n<li>\n<p>Click on the <b>File Manager<\/b> icon under the <i>Files<\/i> subheader.<\/p>\n<\/li>\n<li>\n<p>Browse to the <b>cgi-bin<\/b> by clicking on the folder icons for <b>public_html &gt; cgi-bin<\/b>.<\/p>\n<\/li>\n<li>\n<p>Once inside of the <i>cgi-bin<\/i> directory, right-click on the <strong>FormMail.pl<\/strong> file and click to select <b>Change Permissions<\/b>.<\/p>\n<\/li>\n<li>\n<p>Click the checkboxes to ensure that the <i>User<\/i> column has <b>read, write, and execute<\/b> checked and <i>Group<\/i> and <i>World<\/i> should have <b>read and execute<\/b> checked.<\/p>\n<\/li>\n<li>\n<p>Click the <b>Change Permissions<\/b> button to save these changes.<\/p>\n<\/li>\n<\/ol>\n<h4>Change Permissions Using FTP<\/h4>\n<p>If you are using an FTP client you will want to browse to the <i>cgi-bin<\/i> directory. Then right click on the <strong>FormMail.pl<\/strong> file and look for an option called <i>CHMOD<\/i>. This will open a dialog box where you can make the same changes as described in the cPanel file manager steps above. Make sure execute is turned on for all types of users and that the numbers have changed to 755.<\/p>\n<p><b>Congratulations!<\/b> Now you have a <strong>FormMail.pl script set up<\/strong> that you can use to <em>send email from a contact form on your website<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you can learn how to set up the NMS FormMail script. NOTICE: You will need to download the\u00a0NMS FormMail script. Make sure to download the &#8220;compat&#8221; package. Set Up FormMail Customize FormMail.pl Script Un-compress the downloaded file and upload the FormMail.pl script to your cgi-bin (you will only need to upload the<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\"> Read More ><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-677","post","type-post","status-publish","format-standard","hentry","category-email"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Set up FormMail | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article, we will discuss how to use FormMail to send email from a webpage.\" \/>\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.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Set up FormMail | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article, we will discuss how to use FormMail to send email from a webpage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-08-26T15:35:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:53:16+00:00\" \/>\n<meta name=\"author\" content=\"Brad Markle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brad Markle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"How to Set up FormMail\",\"datePublished\":\"2011-08-26T15:35:10+00:00\",\"dateModified\":\"2021-08-17T03:53:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\"},\"wordCount\":740,\"commentCount\":43,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Email\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\",\"name\":\"How to Set up FormMail | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2011-08-26T15:35:10+00:00\",\"dateModified\":\"2021-08-17T03:53:16+00:00\",\"description\":\"In this article, we will discuss how to use FormMail to send email from a webpage.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Set up FormMail\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\",\"name\":\"Brad Markle\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Set up FormMail | InMotion Hosting","description":"In this article, we will discuss how to use FormMail to send email from a webpage.","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.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/","og_locale":"en_US","og_type":"article","og_title":"How to Set up FormMail | InMotion Hosting","og_description":"In this article, we will discuss how to use FormMail to send email from a webpage.","og_url":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-08-26T15:35:10+00:00","article_modified_time":"2021-08-17T03:53:16+00:00","author":"Brad Markle","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Brad Markle","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"How to Set up FormMail","datePublished":"2011-08-26T15:35:10+00:00","dateModified":"2021-08-17T03:53:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/"},"wordCount":740,"commentCount":43,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Email"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/","url":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/","name":"How to Set up FormMail | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2011-08-26T15:35:10+00:00","dateModified":"2021-08-17T03:53:16+00:00","description":"In this article, we will discuss how to use FormMail to send email from a webpage.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-set-up-formmail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Set up FormMail"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf","name":"Brad Markle","url":"https:\/\/www.inmotionhosting.com\/support\/author\/bradm\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=677"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/677\/revisions"}],"predecessor-version":[{"id":127715,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/677\/revisions\/127715"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}