{"id":3454,"date":"2019-10-25T10:58:46","date_gmt":"2019-10-25T02:58:46","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&#038;p=3454"},"modified":"2022-10-08T17:56:23","modified_gmt":"2022-10-08T09:56:23","slug":"how-to-use-formmail-cgi","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/how-to-use-formmail-cgi","title":{"rendered":"How To Use formmail.cgi"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3454\" class=\"elementor elementor-3454\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t<div class=\"elementor-inner\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3bfc722 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3bfc722\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-39c0b27f\" data-id=\"39c0b27f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a20f818 elementor-widget elementor-widget-heading\" data-id=\"a20f818\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How To Use formmail.cgi<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-435ee21e elementor-widget elementor-widget-text-editor\" data-id=\"435ee21e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-text-editor elementor-clearfix\">\n\t\t\t\t<p><strong><span style=\"font-size: medium;\">Applies to :<\/span><\/strong><\/p><ul><li>All Linux server<\/li><\/ul><p><strong><span style=\"font-size: medium;\">Requirements<\/span><\/strong><\/p><p>To perform this task, you need to have :<\/p><ul><li>Knowledge in accessing the server via\u00a0FTP.<\/li><li>IP address or server hostname.<\/li><li>Your server FTP username and password.<\/li><\/ul><p><strong><span style=\"font-size: medium;\">Instructions<\/span><\/strong><\/p><p>formmail.cgi is free script from Matt&#8217;s Script Archive, Inc. If you post information to formmail.cgi, it will send the information to a specified email address. Please note that formmail.cgi is available only upon request. If you would like to have a copy, please send your request to support@webhosting.com.sg, stating your domain name. Alternatively, you can also download it at\u00a0http:\/\/www.scriptarchive.com\/formmail.html.<\/p><ul><li>First, you must configure formmail.cgi to work for you.<\/li><li>Download formmail.cgi to your local hard disk.<\/li><li>Use a text editor to open formmail.cgi to be edited.Replace the line &#8230;<pre>@referers = ('worldwidemart.com','209.196.21.3');<\/pre><p>&#8230; with &#8230;<\/p><pre>@referers = ('www.mydomain_name');<\/pre><p>For example, if your web site is at\u00a0http:\/\/www.my-company-name.com, then the line is&#8230;<\/p><pre>@referers = ('www.my-company-name.com');<\/pre><p>Replace the line &#8230;<\/p><pre>@recipients = &amp;fill_recipients(@referers);<\/pre><p>&#8230; with &#8230;.<\/p><pre>@recipients = ('^yourself\\@yourdomain\\.com');<\/pre><p>For example, if formmail.cgi is suppose to send information to the email address my_name@my-company-name.com, then the line is&#8230;<\/p><pre>@recipients = ('^my_name\\@my-company-name\\.com');<\/pre><\/li><li>Save the changes, and upload formmail.cgi to your web site.<\/li><li>Now that you have configured your formmail.cgi, the next step is to configure your form.Your form must post to formmail.cgi. This is done by editing the form tag.An example is &#8230;.<form action=\".\/cgi-bin\/formmail.cgi\" method=\"post\" name=\"feedback_form\"><\/form><p>The part that you should edit is &#8230;<\/p><pre>action=\".\/cgi-bin\/formmail.cgi\"<\/pre><p>The &#8220;action&#8221; part should point to your formmail.cgi with respect to the location of your form. Your form should include the &#8220;recipients&#8221; field.<\/p><p>Your form should include this line within the open and close tags of the form.<\/p><pre> <input name=\"recipient\" type=\"hidden\" value=\"me@mydomain.com\" \/><\/pre><p>For example, if the information is supposed to be sent to my_name@my-company-name.com, then the line will look like&#8230;<\/p><pre><input name=\"recipient\" type=\"hidden\" value=\"my_name@my-company-name.com\" \/><\/pre><\/li><\/ul><p>If these 2 things are done correctly, should work on the whole. There are many other configurations available. Please read the README file for more details. (You can download the README file to your local hard disk, then use a text editor to open the README file.)<\/p><p>Please remember to upload your configured back to the server in ASCII mode, and the set the permissions of formmail.cgi as follows: User: read, write, execute; Group: read, execute; Others: read, execute.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>How To Use formmail.cgi Applies to : All Linux server Requirements To perform this task, you need to have : Knowledge in accessing the server via\u00a0FTP. IP address or server hostname. Your server FTP username and password. Instructions formmail.cgi is free script from Matt&#8217;s Script Archive, Inc. If you post information to formmail.cgi, it will &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.mondoze.com\/guide\/kb\/how-to-use-formmail-cgi\"> <span class=\"screen-reader-text\">How To Use formmail.cgi<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[106],"kbtag":[110],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/3454"}],"collection":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/comments?post=3454"}],"version-history":[{"count":6,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/3454\/revisions"}],"predecessor-version":[{"id":19171,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kb\/3454\/revisions\/19171"}],"wp:attachment":[{"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/media?parent=3454"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=3454"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/kbtag?post=3454"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.mondoze.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=3454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}