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!

Retrieve Your Databases with a Click

Master Form V4 can email files on your server to any email address you specify.

Files can be inserted into the body of the email and/or delivered as attachments.

The method is as secure as your FTP and other server access information. That's because Master Form V4 requires an email template file before it will email anything. And the template must be on your server.

Master Form V4-created database files are specifically addressed in this article. But the method will email files created by other programs just as easily and as hassle-free.

Let's assume you have a CSV file in subdirectory "data" (subdirectory to where Master Form V4 is installed). Let's further assume the file is named "feedback.csv".

First build the email template. Then create a form to use the template.

The Email Template

The feedback.csv file can be delivered in the email body. And it can be an attachment to the email.

Probably an attachment would work best, in this case. The attachment, once received, can simply be double-clicked to view. Alternatively, the file can be dragged into a spreadsheet or database program that can import CSV files.

This example presents both retrieval methods. File feedback.csv will be embedded in the body of the email and also attached.

Here is the template:

From: webmaster@example.com
To: webmaster@example.com
Subject: Your file :-)

[[INSERT data/feedback.csv]]
[[ATTACH data/feedback.csv]]

That's all there is to it.

Change the webmaster@example.com email addresses to whatever is appropriate for you.

If you want only an attachment, remove the placeholder. And vice versa.

More than one file may be attached by providing more than one [[ATTACH...]] placeholder, one placeholder per file. Similarly, multiple files can be inserted into the email body with multiple placeholders.

(The Master Form V4 manual has information about the placeholders, including how to specify file locations.)

Upload the email template to your server someplace where Master Form V4 can find it. For our examples, we'll assume the template file name is "filesend.txt" and that it's located in a subdirectory named "templates".

The Form

Here is the form, in a bare web page, to use when having the database emailed to you:

<html>
<body>
<form 
   action="http://example.com/cgi-bin/mf/MasterFormV4.cgi" 
   method="POST">
<input 
   type="hidden" 
   name="redirect" 
   value="http://example.com">
<input 
   type="hidden" 
   name="emailtemplate" 
   value="templates/filesend.txt">
<input 
   value="Retrieve file feedback.csv" 
   type="submit">
</form>
</body>
</html>

That's the simplicity of it.

The form's action needs to be the URL to your installation of Master Form V4.

The hidden name="redirect" field value needs to be changed to the URL of the page you want to see after the form is submitted.

Save the form to your hard drive, maybe on your desktop.

Wherever you want the latest version of the database sent to yourself, open the file in your web-browser and click the button.

Master Form V4 takes care of the rest.

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