spMailer is a free (LGPL) PHP form mailer that is (hopefully) resistant to most forms of automated form-mailer stuffing attacks. Download it, discuss in the forums, or read on for more info. (See http://www.nyphp.org/phundamentals/email_header_injection.php for information about header injection attacks to which most mailer scripts are vulnerable.)
Version 4.0 Changes / Fixes / Additions
=================================================
ADD: The form is manipulated via jQuery (javascript) is a further attempt to block non-browser user agents that might try to stuff the form. Via jQuery, a field is deleted from the form before submission. Another field with a specific value is added to the form. On the processing page (spMailer.php), these fields and value are checked and sending happens only if the fields are the way they're supposed to be.
FIX: logic and core code problems fixed, these were leftovers from version 3 not new problems introduced with v4
Downloads so far — v4 = 65 :: v3 = 613 :: v2 = 258 :: v1 = 611
spMailer is a (hopefully) spambot-safe php form mailer. (See http://www.nyphp.org/phundamentals/email_header_injection.php for information about header injection attacks to which most mailer scripts are vulnerable.)
spMailer offers two modes of operation:
You can use and customize the sample contact/tell-a-friend forms supplied with spMailer if you so desire. They contain PHP code that will display error code messages, should users not fill out your forms as they should.
NOTE: PHP is case sensitive. Keep this in mind as you name your form fields and edit the spMailer.php file. Those values must match exactly, right down to upper and lower case. Also, please don't use spaces in your form field names.
Note 2: Check the new sample contact forms carefully. There's some PHP, JavaScript, and form fields that are required to support the new jQuery-based anti-spam techniques. If you don't use our sample form, you will need to make sure to include these snippets of code in your form.
Line numbers given below might not match the code exactly...sorry!
$config['to'] = '';$config['yourContactForm'] = 'spMailerContactForm.php';//$config['fieldName']['To'] = 'to'; when you're done.$config['to'] = '';$config['required']['To'] = 2;$config['yourContactForm'] = 'spMailerContactForm.php';$config['fieldName']['To'] = 'to';SMTP Authentication is required by some hosting companies as a spam-prevention measure. To use SMTP Authentication, you will need a valid email address (an inbox, not forwarding address), associated password, and SMTP server name.
$config['useSMTPAuth'] = true;Starting with version 3, spMailer supports custom fields in your forms.
$config['extraFields'] = array();addFields('field_name', 'field_label') where field_name is the name of the form field and field_label is text you would like added before the field's contents in the resulting email message.<select multiple name='my_select_multiple[]'>...</select>Starting with version 3, you can pass the data entered by users into the form onto your success page.
$config['passFormValues'] = true;spMailer takes the following steps to prevent header injection attacks:
spMailer is copyright (c) 2007 by Skypanther Studios (www.skypanther.com) and is written by Tim Poulsen - tim (at) skypanther.com. spMailer is free, open source software licensed under the Lesser Gnu Public License (LGPL). You may change or modify the software to suit your needs, at your own risk. spMailer uses phpMailer (http://phpmailer.sourceforge.net/) for mail sending and SMTP Authentication functions. phpMailer is licensed under the LGPL license. Skypanther Studios assumes no responsibility and provides no support for problems resulting from modifying the source code.
Donations in any amount are gladly accepted!
THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER ASSUMES THE ENTIRE RISK OF USING THE SOFTWARE.
spMailer MAY NOT BE USE TO SEND UNSOLICITED COMMERCIAL EMAIL MESSAGES, AKA "SPAM" UNDER ANY CIRCUMSTANCES.