my PHP mail forms quit working

Our host has quit accepting contact form submissions from people using yahoo/hotmail/gmail etc so im not getting any orders since this is the bulk of the world–i contacted them and they looked at my code and told me the following information which i have no idea how to implement as i had someone else write this code in the first place. I’m decent at everything else, just not writing/fixing the PHP code. Any help on what line to add, and where would be greatly appreciated so we can get our orders to pick back up again.

What they told me: As a spam prevention measure we no longer allow emails that leave our servers to appear as if they came from gmail/hotmail or other major provider. You will need to update the "sender envelope" header to send the emails as an email address on the domain. For example any mail scripts on the XXXXXX.COM domain need to send email as if they came from an email address on the XXXXXX.com such as [email protected] or similar.

This is the code that is in my website for the form/mail from address.

<form action="screenprinting.php" method="post" name="request"> <input name="MailFromAddress" type="text" id="MailFromAddress4" size="30" />

it collects the info pertinent to the order, and emails an email address for example [email protected] (which i have setup with an auto responder that tells them more info about the product as they wait for my reply) with a random number in the subject so it helps me keep track of orders.

this would be screenprinting.php for example:
[php]<?
srand ((double) microtime( )*1000000);$random_number = rand(0,999);echo “$random_number”;
$MailToAddress = "[email protected]";
$MailSubject = "EMBROIDERY REQUEST FORM, # $random_number ";
if (!$MailFromAddress) {
$MailFromAddress = “MailFromAddress”;
}
$Header = “”;
$Footer = “”;
?>[/php]

then i have this in the actual ‘thank you for your submission’ page so they can look over what they sent
[php] <?
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
$val=stripslashes($val);
echo “$key = $val
”;
$Message .= “$key = $val\n”;
}

if ($Header) {
$Message = $Header."\n\n".$Message;
}

if ($Footer) {
$Message .= "\n\n".$Footer;
}

mail( “$MailToAddress”, “$MailSubject”, “$Message”, “From: $MailFromAddress”);
?>[/php]

bumper boats

i think what they asking you is on your header instead of putting an gmail or hotmail to repply to you have to put an email with a domain from their servers for example orders.domainname.com

of course you have register that email with them first on your hostler provider

then just change this variable $MailFromAddress = to the name of new registered email.

thanks! i was able to try replacing the address in a couple places and found it to work now…so far the autoreponder doesn’t wont anymore however…not a huge deal but unfortunate.

Yup the autoresponder is coming to me now instead of the customer

Glad i could be of help

Should we mark this thread solved?

Yup thats fine :slight_smile:

Sponsor our Newsletter | Privacy Policy | Terms of Service