Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: dan-ball20070821

Message # 1510268:
Date: 10/03/07 15:58
By: Chris
Subject: RE: PHP email validation

Unfortunately, sending mail with PHP is a little more complicated than this. First of all, this script is wide open to mail injection attack. Google for "PHP mail injection" for more information.

You should also have some sort of spam protection in the validation section. You should at least be checking to see if someone is posting too many links.

Most people are like going to need more headers than what the mail function inserts into the message by default, in order to get through spam filters. One of the more important of these is the return path.

The return path is the email address where bounced mail is sent. Obviously if you are a spammer, you aren't interested in your bounced mail. Consequently you will either not send that header, or use a bogus address for that header. Spam filters look for that.

I would strongly recommend a pre-written class like PEAR::mail, Zend mail or PHPMailer. Sending mail with PHP is somewhat of a dark art. It's best to use proven code, if you want your email system to work as reliably as it can.

Previous Message | Next Message


Comments:
fixed width columns in php reportcmsuser10/18/07 14:46
RE: PHP email validationChris10/03/07 15:58
will never do on real serversbughunter09/09/07 05:08
PHP email validationMorne Wolfaardt08/23/07 05:03
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.