示例#1
0
function sendMail1($sTo, $sFrom, $sSubject, $mMail)
{
    $mail = new PHPMailer1(true);
    $mail->IsMail();
    $mail->IsHTML(true);
    $mail->CharSet = "utf-8";
    try {
        $mail->AddReplyTo($sTo);
        $mail->AddAddress($sTo);
        $mail->SetFrom($sFrom);
        $mail->Subject = $sSubject;
        $mail->MsgHTML($mMail);
        $mail->Send();
    } catch (phpmailerException $e) {
        $sErrorMsg = $e->errorMessage();
    } catch (Exception $e) {
        $sErrorMsg .= $e->getMessage();
    }
    return true;
}
示例#2
0
        db_query("INSERT INTO ?:product_popularity ?e ON DUPLICATE KEY UPDATE viewed = viewed + 1, total = total + ?i", $_data, POPULARITY_VIEW);
        $_SESSION['products_popularity']['viewed'][$_REQUEST['product_id']] = true;
    }
} elseif ($mode == 'disc') {
    $idRow = db_get_fields("SELECT product_id FROM cscart_products");
    foreach ($idRow as $id) {
        $q = db_get_fields("SELECT * FROM  `cscart_discussion` WHERE object_id = {$id}");
        if (empty($q)) {
            db_query("INSERT INTO `cscart_discussion` (`thread_id`, `object_id`, `object_type`, `type`) VALUES (NULL, '{$id}', 'P', 'B');");
        }
        unset($q);
    }
    die('aa');
} elseif ($mode == 'autocomplete') {
    ini_set('display_errors', 2);
    $mail = new PHPMailer1();
    $body = '<b>ss</b>';
    $mail->IsSMTP();
    // telling the class to use SMTP
    $mail->Host = "lindero.ru";
    // SMTP server
    $mail->SMTPDebug = 2;
    // enables SMTP debug information (for testing)
    // 1 = errors and messages
    // 2 = messages only
    $mail->SMTPAuth = true;
    // enable SMTP authentication
    $mail->Host = "lindero.ru";
    // sets the SMTP server
    $mail->Username = "******";
    // SMTP account username