Okay, I am at a complete loss why it seems like php is being 'picky' right now.
The function is:
function user_mail($tofunction, $titlefunction, $subjectfunction, $messagefunction, $fromfunction) {
$message = "
<html>
<head>
<title>".$titlefunction.$subjectfunction."</title>
</head>
<body>
<p style=\"font: 11px arial, sans-serif; color: #000000; text-decoration: none\">
".$messagefunction."
</p>
<p><font style=\"font: 9px arial, sans-serif; color: #000000; text-decoration: none\"><a style=\"font: 9px arial, sans-serif; color: #A7330C; text-decoration: none\" href=\"http://www.theherk.com\">TheHerk</a> © 2002 website developement engine.<br>
-for the most simple website creation</font></p>
</body>
</html>
";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$titlefunction." Admin <".$fromfunction.">\r\n";
if (empty($tofunction) || empty($fromfunction)) {
return;
} else {
mail($tofunction, $titlefunction.$subjectfunction, $message, $headers);
}
}
which works in all cases perfectly as far as I know... except for one. The case that does not work is when "sherwood@srt.com" is passed to it as $tofunction. All other email addresses work here just fine but not this one.
Example:
if ($sendregistration == 1) {
user_mail($registrationuseremail, $head['sitename'], " - Registration", $style['registrationmail'], $head['siteadminemail']);
}
// where $registrationuseremail is what was just registered with (variable in question)
// $head['sitename'] is the name of the website = "The Herk"
// $style['registrationmail'] is the message sent to all new registrants = "Test message"
// and $head['siteadminemail'] is the email address of the site admin = "herk@theherk.com"
If I change "$titlefunction.$subjectfunction" to "$titlefunction" or "$titlefunction."blah"" it works. But with two variables concatenated it will not send mail to "sherwood@srt.com".
Why?
Herk