In recent times, some IXWebHosting customers have had problems getting FormMail to send email from the IX servers.
The solution is to add an "ini_set" call into the PHP code, like this:
PHP Code:
ini_set('sendmail_from', 'webmaster@yourdomain.xyz');
replacing "yourdomain.xyz" with your actual domain name. For us, that would be "tectite.com".
You can just add this straight into FormMail near the top at around line 168, but then you'll have to remember to do this again whenever you upgrade your copy of FormMail.
To avoid this problem, here's the preferred technique:- In FormMail's configuration section, look for $HOOK_DIR and set it to "." (which means "current folder"):
PHP Code:
/* Help: http://www.tectite.com/fmdoc/hook_dir.php */
$HOOK_DIR = ".";
Depending on your version of FormMail, this is around line 580.
- Create a file called "fmhookpreinit.inc.php", with the following contents:
PHP Code:
<?php
ini_set('sendmail_from', 'webmaster@yourdomain.xyz');
?>
making the appropriate replacement of "yourdomain.xyz".
- Upload "fmhookpreinit.inc.php" to your server in the same folder as your copy of FormMail.
- Test FormMail with the usual "testalert" test, and then test your forms.
I've attached a sample "fmhookpreinit.inc.php", which you can download and change with a simple text editor. (Don't use DreamWeaver!).
Thanks to FormMail user, David Owens for the information contained in this tip.
One last thing: PHP on your server must be otherwise setup correctly. For example, you will need an appropriate php.ini (maybe php5.ini) file. IX webhosting is responsible for providing that to you, so please contact your service agent for assistance, if required.
Bookmarks