A No-Reply Email Sending Form
Sometimes you don't want to reveal your email address. But
you need to send an email.
I will show you how to get it done.
Two things have been happening recently that pushed me
toward making a no-reply email sending form.
Situation 1:
We received a short, quick question on a contact form and
responded to it. Shortly thereafter, the "From" address used
in the response was on a spammer's list.
It occurred to us that this may be a new way of harvesting
email addresses send queries to contact forms and harvest
the "From" address of the replies.
Since then, we've received a number of short, kinda stupid,
sometimes self-evident, questions at contact forms of other
domains.
If we think they might be legitimate, but we have
reservations about the intent, we can use the no-reply email
sending form. The email they get contains a URL to a contact
web page if they wish to follow up, but there is no valid
email reply address.
Situation 2:
The harvest-proof email link system at http://flow-to.com/
does a good job. Site owners can publish links for clicking
on so people can write to them without revealing the
destination email address.
The destination address simply can't be harvested when using
that system.
However, if the received email is then replied to, the
"From" email address being used is revealed, just like any
other email sent from desktop email software.
In most cases, that is what is wanted. Someone sends an
email and we reply in such a manner that the conversation
can be continued.
Several users of harvest-proof email links have asked for a
system whereby they can respond to email received without
revealing their "From" address. While it may not be their
norm, they want the ability to chose to do so.
The no-reply email sending form is a response to those
requests.
Setting Up Your No-Reply Email Sending Form
You'll need Master Form V4 installed.
A no-reply email address will need to be set up.
An example form and email template are provided with the
article.
Information about setting up a no-reply email address, the
examples themselves, and installation guidance are provided
below.
In all instructions and examples where no-reply@example.com
is printed in this article, replace the "example.com" part
of the email address with your domain name.
Give it a try. You'll see how easy it really is to set up a
no-reply email sending form.
Setting Up the No-Reply Email Address
With some server set-ups, you won't have to set up a
no-reply address at all, especially if undeliverable email
is sent to :blackhole: (as opposed to :fail: or to a live
email address).
If the form works okay without setting up a no-reply
address, well and good. But if it doesn't, the address will
need to be set up.
Use cPanel or another method provided by your hosting
company to set up a forwarding for no-reply@example.com.
Forward the address to :blackhole: or somewhere else that
discards the email instead of forwarding it to an email box.
If it's not possible to :blackhole: it, have it forwarded to
an address that's always filtered into trash or set up an
email account somewhere that automatically discards all
incoming email for that address.
The idea is to either :blackhole: the email sent to
no-reply@example.com or have it forwarded somewhere that
will automatically discard it.
The Email Template
The "Return-Path" and "From" header lines of the email
template need to contain your no-reply@example.com address.
The email template also needs "To" and "Subject" header
lines.
This example email template also contains other, optional
header lines. They are addressed following the example.
The "MIME-Version," "Content-type," and
"Content-Disposition" header lines are optional.
If used, the "Content-type" may be changed from
text/plain to text/html, if you want to send HTML email, for
example.
If used, and your outgoing email might contain characters
from a different character set than the example, change the
"Content-type" header's charset value. A list of character
sets is at http://www.columbia.edu/kermit/csettables.html
(refers to web pages, but the same character sets are used
for email).
The rest are more or less self-explanatory. The users'
manual for Master Form V4 contains information about the
placeholders in the email and how to use them.
Note in particular that the [[if_Cc]] placeholder is at the
end of the line above the [[Cc]] placeholder. That ensures
the line-feed will be printed only if the sending form field
name="Cc" contains information. (Email headers may contain
no blank lines.)
The "Bcc" header line sends a blind carbon copy to
name@example.com (change that, if you'll be using it). In
addition, if the name="Bcc" form field contains information,
a comma and the form field content are also put into the Bcc
header.
Put the email template on your server where Master Form V4
can find it. It may be prudent to name the template with a
name not easily guessed to elude crackers that might try to
figure it out.
The No-Reply Email Sending Form
The web page with the no-reply email sending form may *not*
be on your server. There is too much potential for abuse.
Instead, put the form on your hard drive, maybe on your
computer's desktop so it's handy.
When ready to use it, load the form into your browser.
Master Form V4 can handle it just as well submitted from
your hard drive as it can submitted from a web page on your
server.
Below is the code for a web page with an example form. It
has some bells and whistles you may wish to remove or
enhance; they're there to show how it might be done.
The web page is designed to be self-contained and work just
fine when loaded into a browser from your computer's desktop.
In the form, change the following three items:
-
The action= URL in the form tag. This must be the
absolute http://... URL to your installation of
MasterFormV4.cgi
-
The location of the email template in hidden field
name="emailtemplate".
-
The URL of the "thank you" page in hidden field
name="redirect".
Also, if your installation of Master Form V4 has
auto-submission protection turned on, the protection code
you use on other forms must also be pasted into this form.
Put it immediately above the closing /form tag.
Those are the only changes that must be done.
The rest will work with the example email template with your
edits made as presented above.
Good To Go
When the form and email template are in place, and the
no-reply email address set up (if necessary), you're ready
to test.
Once tested to work correctly, you're good to go. Use the
form whenever you wish to send an email without a valid From
or Return-Path address.
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©Copyright 2007 Bontrager Connection, LLC Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.