PHP form > How to >
Make sure form e-mails are not blocked by your SPAM filter
Make sure your form results are not blocked by your SPAM filter
Consider this: a customer submits your form asking for more information
about your product, but you never receive his/her inquiry because
your SPAM filter falsly recognizes the e-mail with form results
as SPAM and deletes the message (moves it to Junk/Bulk/Spam folder).
Not good for your business, is it?
Fortunately making sure form messages aren't blocked
by your SPAM filter is an easy task. What you can do is
automatically add something like (MYFORM) to the e-mail subject
and setup your SPAM filter to whitelist any e-mails which subject
starts with (MYFORM).
Again, for the example let's use the final form
from our tutorial to show this. In this form the e-mail subject is defined
by the person submitting the form, so you can't know what the e-mail
subject will actually be. However, we can easily add the (MYFORM) text
before any subject. The original code is:
$subject = check_input($_POST['subject'], "Write a subject");
|
One more line of code and we will add (MYFORM) to the beginning
of e-mail subject:
$subject = check_input($_POST['subject'], "Write a subject");
$subject = "(MYFORM) " . $subject;
|
If you enter Test subject into the subject field it will
actually show up as (MYFORM) Test subject using this code!
All that is left to do is setup your SPAM filter to not
block any e-mails that start with (MYFORM). Your SPAM filter (or e-mail client)
should have a whitelist or filter option which should allow you to do just that.
» Copyright notice
© 2008-2024 myPHPform.com. All rights reserved. Copying or redistributing
any part of this website without our written permission is expressly
forbidden!
|