當前位置: 首頁>>代碼示例>>PHP>>正文


PHP phpmailer::isMail方法代碼示例

本文整理匯總了PHP中phpmailer::isMail方法的典型用法代碼示例。如果您正苦於以下問題:PHP phpmailer::isMail方法的具體用法?PHP phpmailer::isMail怎麽用?PHP phpmailer::isMail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phpmailer的用法示例。


在下文中一共展示了phpmailer::isMail方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDb

 /**
  * Returns database object
  *
  * @param boolean $blAssoc default false
  *
  * @throws oxConnectionException error while initiating connection to DB
  *
  * @return ADOConnection
  */
 public static function getDb($blAssoc = false)
 {
     global $ADODB_FETCH_MODE;
     if ($blAssoc) {
         $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
     } else {
         $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
     }
     if (defined('OXID_PHP_UNIT')) {
         if (isset(modDB::$unitMOD) && is_object(modDB::$unitMOD)) {
             return modDB::$unitMOD;
         }
     }
     if (self::$_oDB !== null) {
         return self::$_oDB;
     }
     global $ADODB_CACHE_DIR;
     global $ADODB_DRIVER, $ADODB_SESSION_TBL, $ADODB_SESSION_CONNECT, $ADODB_SESSION_DRIVER, $ADODB_SESSION_USER, $ADODB_SESSION_PWD, $ADODB_SESSION_DB, $ADODB_SESS_LIFE, $ADODB_SESS_DEBUG;
     //adding exception handler for SQL errors
     $myConfig = self::getInstance()->getConfig();
     $iDebug = $myConfig->getConfigParam('iDebug');
     if ($iDebug) {
         include_once getShopBasePath() . 'core/adodblite/adodb-exceptions.inc.php';
     }
     // session related parameters. don't change.
     //Tomas
     //the default setting is 3000 * 60, but actually changing this will give no effect as now redefinition of this constant
     //appears after OXID custom settings are loaded and $ADODB_SESS_LIFE depends on user settings.
     //You can find the redefinition of ADODB_SESS_LIFE @ oxconfig.php:: line ~ 390.
     $ADODB_SESS_LIFE = 3000 * 60;
     $ADODB_SESSION_TBL = "oxsessions";
     $ADODB_SESSION_DRIVER = $myConfig->getConfigParam('dbType');
     $ADODB_SESSION_USER = $myConfig->getConfigParam('dbUser');
     $ADODB_SESSION_PWD = $myConfig->getConfigParam('dbPwd');
     $ADODB_SESSION_DB = $myConfig->getConfigParam('dbName');
     $ADODB_SESSION_CONNECT = $myConfig->getConfigParam('dbHost');
     $ADODB_SESS_DEBUG = false;
     $ADODB_CACHE_DIR = $myConfig->getConfigParam('sCompileDir');
     $sModules = '';
     if ($iDebug == 2 || $iDebug == 3 || $iDebug == 4 || $iDebug == 7) {
         $sModules = 'perfmon';
     }
     // log admin changes ?
     if ($myConfig->isAdmin() && $myConfig->getConfigParam('blLogChangesInAdmin')) {
         $sModules = ($sModules ? ':' : '') . 'oxadminlog';
     }
     self::$_oDB = ADONewConnection($myConfig->getConfigParam('dbType'), $sModules);
     $sVerPrefix = '';
     $sVerPrefix = '_ce';
     if (!self::$_oDB->connect($myConfig->getConfigParam('dbHost'), $myConfig->getConfigParam('dbUser'), $myConfig->getConfigParam('dbPwd'), $myConfig->getConfigParam('dbName'))) {
         $sConfig = join('', file(getShopBasePath() . 'config.inc.php'));
         if (strpos($sConfig, '<dbHost' . $sVerPrefix . '>') !== false && strpos($sConfig, '<dbName' . $sVerPrefix . '>') !== false) {
             header('location:setup/index.php');
             // pop to setup as there is something wrong
             oxUtils::getInstance()->showMessageAndExit("");
         } else {
             // notifying shop owner about connection problems
             $sFailedShop = isset($_REQUEST['shp']) ? addslashes($_REQUEST['shp']) : 'Base shop';
             $sDate = date('l dS of F Y h:i:s A');
             $sScript = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
             $sReferer = $_SERVER['HTTP_REFERER'];
             //sending a message to admin
             $sWarningSubject = 'Offline warning!';
             $sWarningBody = "\n                Database error in OXID eShop:\n                Date: {$sDate}\n                Shop: {$sFailedShop}\n\n                mysql error: " . self::$_oDB->errorMsg() . "\n                mysql error no: " . self::$_oDB->errorNo() . "\n\n                Script: {$sScript}\n                Referer: {$sReferer}";
             if ($sAdminEmail = $myConfig->getConfigParam('sAdminEmail')) {
                 include 'core/phpmailer/class.phpmailer.php';
                 $oMailer = new phpmailer();
                 $oMailer->isMail();
                 $oMailer->From = $sAdminEmail;
                 $oMailer->AddAddress($sAdminEmail);
                 $oMailer->Subject = $sWarningSubject;
                 $oMailer->Body = $sWarningBody;
                 $oMailer->send();
             }
             //only exception to default construction method
             $oEx = new oxConnectionException();
             $oEx->setMessage('EXCEPTION_CONNECTION_NODB');
             $oEx->setConnectionError($myConfig->getConfigParam('dbUser') . 's' . getShopBasePath() . self::$_oDB->errorMsg());
             throw $oEx;
         }
     }
     if ($iDebug == 2 || $iDebug == 3 || $iDebug == 4 || $iDebug == 7) {
         try {
             self::$_oDB->execute('truncate table adodb_logsql;');
         } catch (ADODB_Exception $e) {
             // nothing
         }
         self::$_oDB->logSQL(true);
     }
     self::$_oDB->cacheSecs = 60 * 10;
     // 10 minute caching
//.........這裏部分代碼省略.........
開發者ID:JulianaSchuster,項目名稱:oxid-frontend,代碼行數:101,代碼來源:oxdb.php

示例2: _sendMail

 /**
  * Returns $oMailer instance
  *
  * @param string $sEmail   email address
  * @param string $sSubject subject
  * @param string $sBody    email body
  *
  * @return phpmailer
  */
 protected function _sendMail($sEmail, $sSubject, $sBody)
 {
     include_once getShopBasePath() . 'core/phpmailer/class.phpmailer.php';
     $oMailer = new phpmailer();
     $oMailer->isMail();
     $oMailer->From = $sEmail;
     $oMailer->AddAddress($sEmail);
     $oMailer->Subject = $sSubject;
     $oMailer->Body = $sBody;
     return $oMailer->send();
 }
開發者ID:ioanok,項目名稱:symfoxid,代碼行數:20,代碼來源:oxdb.php


注:本文中的phpmailer::isMail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。