mediachrome
23-May-2006, 02:52 PM
Been using PHP formMail successfully on fasthosts hosted sites successfully for the past couple of years, but now they've changed their config.
If these scripts are running on windows servers then you may find it necessary to add a line into the code which hardwires the address that the mail is sent from. The line would be something like this:
ini_set("sendmail_from", "the@email.address.com");
You can also set it to a variable from the form, for instance, if you have a variable called $email then you would use
ini_set("sendmail_from", $email);
This was always recommended, but it has recently been enforced to prevent spam being sent out from our servers.
But I can't work out which settings to change in formmail.php to match these requirements. I've tried various combinations without success.
I have set "SENDMAIL_F_OPTION" to true, "INI_SET_FROM" to true and added an hidden input "FromAddr" in the form itself with a value of formmail@mydomain.com.
But nothing seems to work. (sigh)
Anyone got a clue what's going on?
I'm using Formmail.php v7.05, and the sites are all hosted on Windows NT 2003, running PHP 4.3.2
If these scripts are running on windows servers then you may find it necessary to add a line into the code which hardwires the address that the mail is sent from. The line would be something like this:
ini_set("sendmail_from", "the@email.address.com");
You can also set it to a variable from the form, for instance, if you have a variable called $email then you would use
ini_set("sendmail_from", $email);
This was always recommended, but it has recently been enforced to prevent spam being sent out from our servers.
But I can't work out which settings to change in formmail.php to match these requirements. I've tried various combinations without success.
I have set "SENDMAIL_F_OPTION" to true, "INI_SET_FROM" to true and added an hidden input "FromAddr" in the form itself with a value of formmail@mydomain.com.
But nothing seems to work. (sigh)
Anyone got a clue what's going on?
I'm using Formmail.php v7.05, and the sites are all hosted on Windows NT 2003, running PHP 4.3.2