Software, your way.
burger menu icon
WillMaster

WillMaster > LibraryOur Software in Action >  >Master Form V4 in Action

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

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.

Get Master Form V4 here.

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

Support Area – Ask Your Question Here

The "Code in articles help" forum at the Willmaster.com support area is the place to get information about implementing JavaScript and other software code found on Willmaster.com

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

Need Custom Software?
Click to
tell us about
your project.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC