here is the fix for emails not going out for offline payments:
insert that in your index.php on joomla root directory and after the first require calls:
// ########################################################################################
// HACK .... SEND EMAIL TO OFFLINE PAYCHECK PAYMENT TO COMPROFILER
// ########################################################################################
// MAGIK BEGIN
// ########################################################################################
if ((isset($_POST) && $_POST == 'com_comprofiler') && (isset($_POST) && $_POST == 'saveregisters')) {
// YES WE ARE IN :: NOW SAVE NEEDED INFORMATION TO A SECRET SAFE PLACE
$subscriptionParams = array();
$db =& JFactory::getDBO();
// GET PLAN NAME AND DESCRIPTION
$query = "SELECT * FROM #__cbsubs_plans WHERE id = ".$_POST[0][0];
$db->setQuery($query);
$row = $db->loadAssoc();
$subscriptionParams = $row;
$subscriptionParams = strip_tags($row);
// CHECK WHETHER IT'S A NEW USER OR LOGGEDIN USER
if (isset($_POST)) {
// LOGGED IN USER - GET USER INFORMATION
$query = "SELECT * FROM #__users WHERE id = ".$_POST;
$db->setQuery($query);
$row = $db->loadAssoc();
$subscriptionParams = array(
'Name'=>$row,
'Email'=>$row,
'Username'=>$row,
'isloggedin'=>true,
'planName'=> $row,
);
} else {
// NEW USER - SAVE PARAMETERS
$subscriptionParams = array(
'Name'=>$_POST.' '.$_POST,
'Email'=>$_POST,
'Password'=>$_POST,
'Username'=>$_POST,
'isloggedin'=>false,
'planName'=> $row,
);
$_SESSION["magik"] = serialize($subscriptionParams);
}
} else {
// STEP 2 SEND EMAIL BABY
if ((isset($_POST) && $_POST == 'showinstructions') && (isset($_GET) && $_GET == 'cbpaidsubscriptions')) {
if (isset($_SESSION)) {
$subscriptionParams = unserialize($_SESSION);
// SEND EMAIL TO SUBSCRIBER
$mailer =& JFactory::getMailer();
$config =& JFactory::getConfig();
$sender = array(
$config->getValue( 'config.mailfrom' ),
$config->getValue( 'config.fromname' ) );
$mailer->setSender($sender);
$recipient = $subscriptionParams;
$recipient2 = $config->getValue( 'config.mailfrom' );
$mailer->addRecipient($recipient);
$mailer->addRecipient($recipient2);
if (!$subscriptionParams) {
$details="
Your login details are:
Email: ".$subscriptionParams."
Username: ".$subscriptionParams."
password: ".$subscriptionParams."
";
} else {
$details="
your login information are:
//Email: ".$subscriptionParams."
Username: ".$subscriptionParams."
";
}
$body_ = "
Dear Mr. ".$subscriptionParams.",
Your registration details for '".$subscriptionParams."' have been saved, but your membership is not yet active.
".$details."0
..........rest of your message";
$mailer->setSubject('CPE Subscription');
$mailer->setBody($body_);
$send =& $mailer->Send();
unset($_SESSION);
}
}
}
// ########################################################################################
// MAGIK END
// ########################################################################################