{"id":673,"date":"2011-08-25T18:49:28","date_gmt":"2011-08-25T18:49:28","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2011\/08\/25\/how-to-send-email-from-a-web-page\/"},"modified":"2021-08-16T23:53:21","modified_gmt":"2021-08-17T03:53:21","slug":"how-to-send-email-from-a-web-page","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/","title":{"rendered":"How to Send Email from a Web Page"},"content":{"rendered":"<p>There are several different tools available that you can use to <strong>send emails from a web page<\/strong>. The following scripts are the most commonly used on our servers:<\/p>\n<h2>FormMail<\/h2>\n<p>Using a simple script (see below), you can quickly <a href=\"\/support\/email\/how-to-set-up-formmail\/\">set up FormMail to send emails<\/a> from a Contact Us page, for example.<\/p>\n<pre>&lt;form method=\"post\" action=\"https:\/\/www.example.com\/cgi-bin\/FormMail.pl\" accept-charset=\"ISO-8859-1\" onsubmit=\"var &nbsp; originalCharset = document.charset; document.charset = 'ISO-8859-1';\n  window.onbeforeunload = function (){document.charset=originalCharset;};\"&gt;:\n\n    Your Name  &nbsp; &lt;input name=\"realname\" \/&gt;\n    Your Email &nbsp; &lt;input name=\"email\"    \/&gt; \n    Your Message \n     &lt;textarea cols=\"40\" rows=\"10\" name=\"Message\"&gt;\n     &lt;\/textarea&gt; \n     &lt;input type=\"submit\" value=\"Send\" \/&gt; \n     &lt;input type=\"hidden\" name=\"recipient\" value=\"admin@example.com\" \/&gt;\n    &lt;input type=\"hidden\" name=\"subject\" value=\"Subject\" \/&gt;\n    &lt;input type=\"hidden\" name=\"redirect\"  value=\"https:\/\/www.example.com\/thanks.html\" \/&gt;\n    &lt;input type=\"hidden\" name=\"missing_fields_redirect\"  value=\"https:\/\/www.example.com\/error.html\" \/&gt;\n    &lt;input type=\"hidden\" name=\"required\" value=\"realname,email,Message\" \/&gt;\n\n&lt;\/form&gt;\n\n<\/pre>\n<h2>phpMailer<\/h2>\n<p><a href=\"\/support\/email\/using-phpmailer-to-send-mail-through-php\/\">How to use phpMailer to send emails from a webpage<\/a><\/p>\n<h2>PHP mail() function:<\/h2>\n<p><a href=\"\/support\/email\/using-the-php-mail-function-to-send-emails\/\">Using the PHP Mail() Function to send emails from a webpage<\/a><\/p>\n<h2><b>What script should I choose?<\/b><\/h2>\n<p>If you are creating a, &#8220;<strong>Contact Us<\/strong>&#8221; type of page, you may want to look into using FormMail. FormMail is configured to send to the same email address every time, and is a simple script to setup.<\/p>\n<p>If the email address you need to send to is a different email address every time, for example a user has signed up for something on your website and needs a confirmation email, you should look into using either phpMailer or the php mail() function. Both of these scripts can be used within php, and this is very useful if the email address you need to email is gathered from a variable in your php script.<\/p>\n<p>The phpMailer script can work on any of our servers, however due to current SPAM standards involved with the PHP &#8216;nobody&#8217; user, the php mail() function is not enabled on all of our servers. All of our newer shared servers have the php mail() function enabled, however it is not enabled on some of our previous servers. Please contact the support department if you are unsure whether your server has the php mail() function enabled.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are several different tools available that you can use to send emails from a web page. The following scripts are the most commonly used on our servers: FormMail Using a simple script (see below), you can quickly set up FormMail to send emails from a Contact Us page, for example. &lt;form method=&#8221;post&#8221; action=&#8221;https:\/\/www.example.com\/cgi-bin\/FormMail.pl&#8221; accept-charset=&#8221;ISO-8859-1&#8243;<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\"> 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-673","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 Send Email from a Web Page | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"In this article, we will explain how to send email from a web page.\" \/>\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-send-email-from-a-web-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Send Email from a Web Page | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"In this article, we will explain how to send email from a web page.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\" \/>\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-25T18:49:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:53:21+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=\"2 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-send-email-from-a-web-page\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\"},\"author\":{\"name\":\"Brad Markle\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf\"},\"headline\":\"How to Send Email from a Web Page\",\"datePublished\":\"2011-08-25T18:49:28+00:00\",\"dateModified\":\"2021-08-17T03:53:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\"},\"wordCount\":277,\"commentCount\":31,\"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-send-email-from-a-web-page\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\",\"name\":\"How to Send Email from a Web Page | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2011-08-25T18:49:28+00:00\",\"dateModified\":\"2021-08-17T03:53:21+00:00\",\"description\":\"In this article, we will explain how to send email from a web page.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Send Email from a Web Page\"}]},{\"@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 Send Email from a Web Page | InMotion Hosting","description":"In this article, we will explain how to send email from a web page.","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-send-email-from-a-web-page\/","og_locale":"en_US","og_type":"article","og_title":"How to Send Email from a Web Page | InMotion Hosting","og_description":"In this article, we will explain how to send email from a web page.","og_url":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2011-08-25T18:49:28+00:00","article_modified_time":"2021-08-17T03:53:21+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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/"},"author":{"name":"Brad Markle","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/5ae05d1210b0ef63c437ccedce2799bf"},"headline":"How to Send Email from a Web Page","datePublished":"2011-08-25T18:49:28+00:00","dateModified":"2021-08-17T03:53:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/"},"wordCount":277,"commentCount":31,"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-send-email-from-a-web-page\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/","url":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/","name":"How to Send Email from a Web Page | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2011-08-25T18:49:28+00:00","dateModified":"2021-08-17T03:53:21+00:00","description":"In this article, we will explain how to send email from a web page.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/email\/how-to-send-email-from-a-web-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Send Email from a Web Page"}]},{"@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\/673","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=673"}],"version-history":[{"count":9,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":86660,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/673\/revisions\/86660"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}