I have this php code below, however to be able to use it, my hosting company, have asked me to use their relay server which is;
(relay-hosting.secureserver.net ) How and where in my code would i type this? - Thankyou.
<?php
$subject = $_POST[“subject”];
$message = $_POST[“message”];
$from = $_POST[“from”];
$verif_box = $_POST[“verif_box”];
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);
if(md5($verif_box).‘a4xn’ == $_COOKIE[‘tntcon’]){
mail(“myemailaddresshere”, ‘Online Form: ‘.$subject, $_SERVER[‘REMOTE_ADDR’]."
".$message, “From: $from”);
setcookie(‘tntcon’,’’);
} else if(isset($message) and $message!=“”){
header(“Location:”.$_SERVER[‘HTTP_REFERER’].“?subject=$subject&from=$from&message=$message&wrong_code=true”);
exit;
} else {
echo “no variables received, this page cannot be accessed directly”;
exit;
}
?>
Ernie1
January 3, 2010, 3:32pm
2
you will have to set the smtp value:
<?php
ini_set("SMTP", "smtp.domain.com");
thankyou, however i still have the same issue (labelled). I followed godaddy guidelines on smtp. im stumped!
<?php
ini_set(‘sendmail_from’, ‘user@domain.tld’); //do i edit user@domain.tld to my email addy?
ini_set(‘SMTP’, ‘relay-hosting.secureserver.net ’);
$subject = $_POST[“subject”];
$message = $_POST[“message”];
$from = $_POST[“from”];
$verif_box = $_POST[“verif_box”];
$message = stripslashes($message);
$subject = stripslashes($subject);
$from = stripslashes($from);
if(md5($verif_box).‘a4xn’ == $_COOKIE[‘tntcon’]){
mail(“design@stevenagewebsitedesign.co.uk ”, ‘Online Form: ‘.$subject, $_SERVER[‘REMOTE_ADDR’]."
".$message, “From: $from”); //issue on this line
setcookie(‘tntcon’,’’);
} else if(isset($message) and $message!=“”){
header(“Location:”.$_SERVER[‘HTTP_REFERER’].“?subject=$subject&from=$from&message=$message&wrong_code=true”);
exit;
} else {
echo “no variables received, this page cannot be accessed directly”;
exit;
}
?>
… im stumped