2. Email is not being sent.

As most of you are aware, Spam is an epidemic and there is no sign of a cure on the horizon. Many ISP (Internet Service Providers) and Web Hosting companies have implemented filters and such to try and catch known sources but the flood of spam persists.

With the above in mind, we as "web masters" have a few things to consider, especially if your web site allows for your visitors to communicate with you and each other via E-mail.

For starters, its important that people who use your site and supply you with an E-mail address are safe from people who seek to collect or farm these E-mail addresses in an effort to build a Spam list.

68 Classifieds does a good job of protecting or visitors E-mail addresses by allowing us to make the field invisible and by allowing visitors to fill out a web based form which in turn sends an E-mail thereby keeping the recipients E-mail address hidden from those who may seek to use it for no good.

Next, we need to understand how web based forms send E-mail. Web based forms in and of themselves can simply pass data thats entered into them. This data in turn needs to be handled by some sort of "program" to get from the web form to the E-mail recipient. In the case of 68 Classifieds the form input is handled via PHP which is a server side scripting language.

Now, PHP in and of itself can not send E-mail, what it does is take the form data and it builds the E-mail message and then passes this message on to an E-mail server running on the web host. The E-mail Server in turn sends along the E-mail message to the E-mail server in charge of handling E-mail for the recipients Domain where it waits for the recipeint to use a mail client (ie Eudora, outlook etc) to connect to their local E-mail Server and request inbound mail.

Since PHP (and server side scripts in general) can so easily build E-mail messages and pass them along to the E-mail server spammers have exploited the use of PHP (and server side scripts in general) to send out massive amount of unsolicited mail. When using an E-mail client (ie Eudora, Outlook etc) the programs generally follow strict adherance in regards to the header information contained in an E-mail message when they send it. Mail that is created and sent via a script does not need to adhere to these rules and thus can easily be abused. For example I am sure we have all gotten e-mail that is addressed to someone other than you and has an invalid sender as well.

In an effort to curtail abuse of their E-mail Servers, many Web hosts have put restrictions in place to control how mail is sent. PHP has a built in function called mail() which is specifically designed to work with Sendmail (one of the most prominent E-mail Server in use today). The problem that Web Hosts face is that scripts function on the server as a user and generally that user is "nobody".

Ok, so what does that have to do with me you saying? Well, for starters, many Web hosts have their E-mail servers set up to not accept mail from their own clients if it has an invalid mail header. Some have even disabled the PHP mail() function altogether. Others allow the PHP mail() function but require the header be complete. Some require us to use SMPT (Simple Mail Transfer Protocol which is just another protocol for sending mail to a server) and then even others require the use of SMTP AND authentication, which means you have to actually use your user name and password for every mail message sent so they can make sure your are a client. Additionally many ISP's will automatically filter incoming mail from other E-mail servers that dont have valid mail headers.

Due to the wide range of limitations imposed by various Web Hosts here is something I recommend for anyone installing 68 classifieds.

Contact your web hosting company and let them know you have a PHP script you want to run that utilizes web based form to send E-mail and ask them what limitations, if any, are in place on scripts sending mail.

68 Classifieds uses a very complete e-mail class to handle E-mail and can easily be made to work with almost any set of rules you web host may have in place. The key is just finding out what limitations are in place so the changes can be made.

If you find that after installing 68 Classifieds that the various E-mail functions(ie contact us, contact seller and registration e-mails) arent working, chances are the problem is due to the restrictions put in place by your web host.

No need to panic! Just post up the reply you got from your web host regarding their scripts sending E-mail limitations and youll be up and running in no time.

Written by lhotch