I got in touch with my hosting company(SurpassHosting).
The put up a small test and it runs fine.
I will send code here from the test files to include everything. They uploaded 3 files.
Sendmailtest.php
`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "Use Back - Enter valid e-mail\n";
$badinput = "Feedback was NOT submitted\n";
echo $badinput;
die ("Go back! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "Use Back - fill in all fields\n";
die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("spam1@olihar.com", $subject, $message, $from);
?>
<p align="center">
Date: <?php echo $todayis ?>
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
Attention: <?php echo $attn ?>
Message:
<?php $notesout = str_replace("\r", "", $notes);
echo $notesout; ?>
<?php echo $ip ?>
Next Page
</body>
</html>
`
tesingcontact.php
`
<?php
$to = "spam1@olihar.com";
$subject = "Php test mail";
$body = "Test mail for php mail()";
if (mail($to, $subject, $body)) {
echo("Yes you have done it
");
} else {
echo("Oops try once more..
");
}
?>
`
testcont.php
`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email Form </title>
</head>
<body>
<form method="post" action="sendmailtest.php">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
Your Name:
<input type="text" name="visitor" size="35" />
Your Email:
<input type="text" name="visitormail" size="35" />
Attention:
<select name="attn" size="1">
<option value=" Sales n Billing ">Sales n Billing </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Webmaster ">Webmaster </option>
</select>
Mail Message:
<textarea name="notes" rows="4" cols="40"></textarea>
<input type="submit" value="Send Mail" />
Free Code at: ibdhost.com/contact/
</form>
</body>
</html>
`
Just to include everything from my hosting company even though not necessary, I wonder what the bug could be in Zenphoto or the plugin.
P.s. I got an email in my inbox stating "Test mail for php mail()"