Пример #1
0
 function send_confirmation_email($email, $data)
 {
     $lost_confirm = $data['verification_number'];
     $lost_uname = $data['uname'];
     $_from = array(SYSTEM_EMAIL => SYSTEM_EMAIL_NAME);
     $_to = array("{$email}" => $data['uname']);
     $_subject = "NinjaWars Account Confirmation Info";
     $_body = render_template('lostconfirm_email_body.tpl', array('lost_uname' => $lost_uname, 'lost_confirm' => $lost_confirm, 'account_id' => $data['account_id']));
     $mail_obj = new Nmail($_to, $_subject, $_body, $_from);
     $mail_obj->setReplyTo(array(SUPPORT_EMAIL => SUPPORT_EMAIL_NAME));
     return $mail_obj->send();
 }
Пример #2
0
 function send_confirmation_email($email, $data)
 {
     $lost_confirm = $data['verification_number'];
     $lost_uname = $data['uname'];
     $confirmed = $data['confirmed'];
     /*$headers  = "MIME-Version: 1.0\r\n";
     	$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
     	$headers .= 'Reply-To: '.SUPPORT_EMAIL."\r\n";*/
     $_from = array(SYSTEM_EMAIL => SYSTEM_EMAIL_NAME);
     $_to = array("{$email}" => $data['uname']);
     $_subject = "NinjaWars Account Confirmation Info";
     $_body = render_template('lostconfirm_email_body.tpl', array('lost_uname' => $lost_uname, 'lost_confirm' => $lost_confirm, 'account_id' => $data['account_id']));
     $mail_obj = new Nmail($_to, $_subject, $_body, $_from);
     $mail_obj->setReplyTo(array(SUPPORT_EMAIL => SUPPORT_EMAIL_NAME));
     if (DEBUG) {
         $mail_obj->dump = true;
     }
     $sent = false;
     $sent = $mail_obj->send();
     return $sent;
 }
Пример #3
0
function send_signup_email($account_id, $signup_email, $signup_name, $confirm, $class_identity)
{
    /*$headers  = "MIME-Version: 1.0\r\n";
    	$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    	$headers .= "From: ".SYSTEM_EMAIL_NAME." <".SYSTEM__EMAIL.">\r\n";
    	$headers .= "Reply-To: ".SUPPORT_EMAIL_NAME." <".SUPPORT_EMAIL.">\r\n";*/
    //  ***  Sends out the confirmation email to the chosen email address.  ***
    $class_display = class_display_name_from_identity($class_identity);
    $_to = array("{$signup_email}" => $signup_name);
    $_subject = 'NinjaWars Account Sign Up';
    $_body = render_template('signup_email_body.tpl', array('send_name' => $signup_name, 'signup_email' => $signup_email, 'confirm' => $confirm, 'send_class' => $class_display, 'SUPPORT_EMAIL' => SUPPORT_EMAIL, 'account_id' => $account_id));
    $_from = array(SYSTEM_EMAIL => SYSTEM_EMAIL_NAME);
    // *** Create message object. ***
    $message = new Nmail($_to, $_subject, $_body, $_from);
    // *** Set replyto address. ***
    $message->setReplyTo(array(SUPPORT_EMAIL => SUPPORT_EMAIL_NAME));
    if (DEBUG) {
        $message->dump = true;
    }
    $sent = false;
    // By default, assume failure.
    $sent = $message->send();
    return $sent;
}
Пример #4
0
function send_signup_email($account_id, $signup_email, $signup_name, $confirm, $class_identity)
{
    //  ***  Sends out the confirmation email to the chosen email address.  ***
    $class_display = class_display_name_from_identity($class_identity);
    $_to = array("{$signup_email}" => $signup_name);
    $_subject = 'NinjaWars Account Sign Up';
    $_body = render_template('signup_email_body.tpl', array('send_name' => $signup_name, 'signup_email' => $signup_email, 'confirm' => $confirm, 'send_class' => $class_display, 'SUPPORT_EMAIL' => SUPPORT_EMAIL, 'account_id' => $account_id));
    $_from = array(SYSTEM_EMAIL => SYSTEM_EMAIL_NAME);
    // *** Create message object. ***
    $message = new Nmail($_to, $_subject, $_body, $_from);
    // *** Set replyto address. ***
    $message->setReplyTo(array(SUPPORT_EMAIL => SUPPORT_EMAIL_NAME));
    return $message->send();
}