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]