Master Form V4 as a Web Page Mailer
With it's versatility and sophistication, Master Form V4 can easily be used as a web page mailer the "email this web page to yourself or a friend" idea.
If you'd like to provide the opportunity to email entire web pages, Master Form V4 is the software to use.
Mailing entire web pages, with the layout of the original, is ideal for article, special sale, and dense information types of web pages, especially if ads are to accompany the web page or the web page content is subject to change.
To implement, a simple form field for an email address is sufficient. A submit button may be required if there is more than one form on the web page. Some text to prompt the user or explain what to do may be prudent.
The form does not need to clutter up the web page at all.
Here is a form that may be used (has certain assumptions):
<form method="POST" action="/cgi-bin/MasterFormV4.cgi"> <input type="hidden" name="redirect" value="http://example.com/thankyou.html"> <input type="hidden" name="emailtemplate" value="emailpage01.txt"> Email this web page! <input type="text" name="email" size="17" value="email here"> <input type="submit" value="Send Web Page"> </form>
You'll notice two hidden fields in the above example, one with the redirect URL, where the browser will be sent after submitting the form, and one with the location of the email template (more about that below).
The user doesn't see the hidden fields.
But the text input field is visible (which, in the above example, has an "email here" prompt), as is the submit button (with "Send Web Page" text).
No more is required of the form. And, as mentioned earlier, the text prompt and submit button might yet be eliminated.
When the form is submitted, Master Form V4 retrieves the email template, inserts or attaches the web page, sends the email, and then redirects the browser to the web page at the redirect URL.
You'll notice that the above example form does not provide a place for the user to type a personal message.
A personal message text box can be provided, allowing a note to be sent with the web page. Master Form V4 has both anti-hijack and automatic submission protection to prevent spamming.
When the example form is submitted, Master Form V4 retrieves email template emailpage01.txt and generates an email containing the web page, then sends the email to the address provided on the form.
This 6-line template would suffice:
MIME-Version: 1.0 Content-Type: text/html; charset="ISO-8859-1" To: [[email]] Subject: The Web Page you requested [[INSERT http://example.com/webpage.html]]
The first 4 lines represent the email header. Two lines to specify HTML email, one to specify the destination of the email (containing a placeholder for the email address provided on the form), and one to specify the email subject.
The 5th line is blank, separating the header from the email body content.
Line 6 is the only email body content, a placeholder that causes Master Form V4 to retrieve the web page at the URL specified and to insert it into the email in lieu of the placeholder.
One thing about the web page being inserted into the email is that URLs (links, SRC's, HREF's, and so forth) in the web page must all be absolute http://... URLs. Relative URLs will break.
That is an important item to check. If your web page has any relative URLs, that item will break be it image, external style sheet, clickable link, form action, or whatever. Just make sure all URLs are absolute and you'll be good to go.
The form, the email template, and the web page to be inserted into the email are the requirements for using Master Form V4 as a web page mailer.
Will Bontrager