Simple PHP problem. Here's the Code!
Ok. I have a vBulletin forum. When a user clicks on register and fills out the required fields and goes to the body to submit I get the following error:Fatal error: Call to undefined function: mail() in /home/sisco/public_html/admin/functions.php on line 103
This also occurs when a user requests a password and so on:
Here's the script:
JUST TO LET YOU KNOW THIS IS LINE 103
PHP Code:
mail($toemail, $subject, $message, trim($headers));
// ####################### Start Regstring #####################
function regstring($length)
{
$chars = '2346789ABCDEFGHJKLMNPRTWXYZ';
// . 'abcdefghjkmnpqrstwxyz'; easier to read with all uppercase
for ($x = 1; $x <= $length; $x++)
{
$number = rand(1, strlen($chars));
$word .= substr($chars, $number - 1, 1);
}
return $word;
}
// ###################### Start vbmail #######################
// vBulletin wrapper for PHP's 'mail()' function
function vbmail($toemail, $subject, $message, $from = '', $headers = '', $username = '') {
global $bbtitle, $webmasteremail;
$toemail = trim($toemail);
if ($toemail) {
$subject = trim($subject);
$message = preg_replace("/(\r\n|\r|\n)/s", "\r\n", trim($message));
$from = trim($from);
$username = trim($username);
// work out the 'From' header
if ($from == '') {
$headers = "From: \"$bbtitle Mailer\" <$webmasteremail>\r\n" . $headers;
} else {
$headers = 'From: "' . iif($username, "$username @ $bbtitle", $from) . "\" <$from>\r\n" . $headers;
}
// actually send the email message
mail($toemail, $subject, $message, trim($headers));
return true;
} else {
return false;
}
}
// ###################### Start getpagenav #######################
// template-based page splitting system from 3dfrontier.com

function getpagenav($results,$address) {
global $perpage,$pagenumber,$pagenavpages;
if ($results <= $perpage) {
return "";
}
It's my own box with RedHat 9. This is a vBulletin Script. Please Help! Thankz It's Greatly Appreciated.
BTW I HAVE QMAIL, VPOPMAIL AND SQUIRELLMAIL INSTALLED.. I INSTALLED IT BY FOLLOWING QMAILROCKS.COM! THNKZ!