Use mail function on hosts that disable it

Posted by tech master  |  at  3:09 PM No comments

Alright, as most of you know a lot of sites has PHP in safemode for security reasons. Safemode doesn't regulate too many things and most scripts, CMS', forums can work with safemode. But for some other things it cripples it.

For instance the mail() function is not allowed to function unless using an SMTP server. But if you have created a custom script there is not real simple way to do this, there is no play SMTP parameter. You have to find an alternate way of doing it. After going through many scripts that do this I have finally found one that works with this host (don't know why others didn't work).

This script need no configuration and only requires you to change 3 things in your script to function. Ok so let's get started.

Step 1: Download
First you will need to download the script from here:
Click here to download

Step 2: Unzip & Upload
After you have it unzip the contents onto your computer and then upload "email.php" to your website.

Step 3: Configure
Now go into your script and add the following link to the top and also put "<" just before the code given below and place ">" just after the code given below.
CODE

? require_once("path to file/email.php"); ?


Changing path to file depending on where it is.

After that all you need to change in the script is:

mail()
-to-
email()

and

sendTo()
-to-
to()



That should be it and it should work now, try sending a test to yourself.

Tagged as:

About the Author

Write admin description here..

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

Related posts

0 comments:

What they says

Copyright © 2013 Techsense. WP Theme-junkie converted by BloggerTheme9
Blogger template. Proudly Powered by Blogger.| Distributed by Rocking Templates
back to top