I have a php script with templets that works fine on one server(Verio) but wont work on another server(NtiDesign). I get an error in line 65 of mail.php, which is the actual line that send the mail, on the ntidesign servers, but it works great on verio. you can goto them yourself at (nti)www.thewealthbuildersclub.com/mail.php, and (verio)www.offshore911.com/mail.php. If you could please help me out, that would be great.
:::source:::
<?php
$ip = getenv("REMOTE_ADDR");
$version = "1.0.1";
if ($action != "sendmail") {
$p = base64_decode('PHAgYWxpZ249ImNlbnRlciI+PGZvbnQgc2l6ZT0iMSI+PGI+UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vd3d3LnNjcmlwdHMyNC5jb20iIHRhcmdldD0iX2JsYW5rIj4yNCBNYWlsPC9hPjwvYj48L2ZvbnQ+PC9wPg==');
include ("templates/mailform.tpl");
exit;
}
if ($action == "sendmail") {
$recnameto = split (",",$recname);
$recemailto = split (",",$recemail);
$count = count ($recemailto);
for ($i=0;$i<$count;$i++) {
if ($name == "") {
$nameerror = "1";
$send = "no";
}
if ($recnameto[$i] == "") {
$nameerror = "1";
$recsend = "no";
}
if (!ereg('[-!#$%&\'+\./0-9=?A-Za-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_a-z{|}~]+.'.'[-!#$%&\'+\./0-9=?A-Za-z{|}~]+$', $email) || ereg("'", $email)) {
$emailerror = "1";
$send = "no";
}
if (!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+'.'@'.'[-!#$%&\'*+\/0-9=?A-Z_a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_a-z{|}~]+$', $recemailto[$i]) || ereg("'", $recemailto[$i])) {
$recemailerror = "1";
$send = "no";
}
if ($subject == "") {
$subjecterror = "1";
$send = "no";
}
if ($message == "") {
$messageerror = "1";
$send = "no";
}
if ($cname == $name && $cemail == $email && $crecname == $recnameto[$i] && $crecemail == $recemailto[$i] && $csubject == $subject && $cmessage == $message && $cip == $ip) {
$cookieerror = "1";
$send = "no";
}
if ($send == "no") {
$error = "1";
include ("templates/mailform.tpl");
exit;
}
}
$message = nl2br($message);
setcookie(cname, $nameto[$i], time()+86400);
setcookie(cemail, $email, time()+86400);
setcookie(crecname, $recname, time()+86400);
setcookie(crecemail, $recemail, time()+86400);
setcookie(csubject, $subject, time()+86400);
setcookie(cmessage, $message, time()+86400);
setcookie(cip, $ip, time()+86400);
$recnameto = split (",",$recname);
$recemailto = split (",",$recemail);
$count = count ($recemailto);
for ($i=0;$i<$count;$i++) {
if ($send != "no") {
$mailheader = "From: $name <$email>\nX-Mailer: 24 Mail v$version by www.scripts24.com\nContent-Type: text/html";
mail("$recnameto[$i] <$recemailto[$i]>","$subject","$message","$mailheader");
}
}
$p = base64_decode('PHAgYWxpZ249ImNlbnRlciI+PGZvbnQgc2l6ZT0iMSI+PGI+UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vd3d3LnNjcmlwdHMyNC5jb20iIHRhcmdldD0iX2JsYW5rIj4yNCBNYWlsPC9hPjwvYj48L2ZvbnQ+PC9wPg==');
include("templates/mailsent.tpl");
exit;
}
?>