How to Send Email from a Web Page Updated on August 16, 2021 by Brad Markle 2 Minutes, 0 Seconds to Read 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: Table of Contents FormMail phpMailer PHP mail() function: What script should I choose? FormMail Using a simple script (see below), you can quickly set up FormMail to send emails from a Contact Us page, for example. <form method="post" action="https://www.example.com/cgi-bin/FormMail.pl" accept-charset="ISO-8859-1" onsubmit="var originalCharset = document.charset; document.charset = 'ISO-8859-1'; window.onbeforeunload = function (){document.charset=originalCharset;};">: Your Name <input name="realname" /> Your Email <input name="email" /> Your Message <textarea cols="40" rows="10" name="Message"> </textarea> <input type="submit" value="Send" /> <input type="hidden" name="recipient" value="[email protected]" /> <input type="hidden" name="subject" value="Subject" /> <input type="hidden" name="redirect" value="https://www.example.com/thanks.html" /> <input type="hidden" name="missing_fields_redirect" value="https://www.example.com/error.html" /> <input type="hidden" name="required" value="realname,email,Message" /> </form> phpMailer How to use phpMailer to send emails from a webpage PHP mail() function: Using the PHP Mail() Function to send emails from a webpage What script should I choose? If you are creating a, “Contact Us” 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. 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. The phpMailer script can work on any of our servers, however due to current SPAM standards involved with the PHP ‘nobody’ 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. Share this Article Related Articles Transferring Emails from Your Old Host to InMotion Hosting How to Setup Office 365 DNS Records How to fix OLMAPI32.dll and WWLIB.dll error in Outlook 2013 How to Setup Outlook 2016 for Mac Issues with Outlook 2007 Running on Windows 10 Outlook not working after installing Windows 10 IMAP Issues Affecting Outlook 2013 and Office 365 Outlook 2013/Office 365 – Subscribing to your Inbox How to create an email signature in Outlook 2003 How to create an email signature for Mac in Outlook 2011