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


PHP CI_Email::__construct方法代碼示例

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


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

示例1: array

 /**
  *
  */
 function __construct()
 {
     date_default_timezone_set('Asia/Calcutta');
     $ci = CI::get_instance();
     $ci->load->Model('Email_settings/Mdl_email_settings');
     //load email settings model
     $smtp = $ci->Mdl_email_settings->toArray();
     //get object valeus in array
     $config = array();
     $config['protocol'] = 'smtp';
     $config['mailpath'] = '/usr/sbin/sendmail';
     $config['smtp_host'] = $smtp['smtp_host'];
     $config['smtp_pass'] = $smtp['smtp_pass'];
     // email's password    - set smtp values
     $config['smtp_user'] = $smtp['smtp_user'];
     $config['smtp_port'] = $smtp['smtp_port'];
     //gmail port 465 (ssl) and 587 (TSL) required
     $config['smtp_timeout'] = 10;
     //smtp timeout in seconds
     $config['wordwrap'] = TRUE;
     $config['wrapchars'] = 76;
     $config['mailtype'] = 'html';
     $config['charset'] = 'utf-8';
     $config['validate'] = TRUE;
     $config['priority'] = 3;
     $config['crif'] = "\r\n";
     $config['newline'] = "\r\n";
     $config['bcc_batch_mode'] = TRUE;
     $config['bcc_batch_size'] = 200;
     parent::__construct($config);
 }
開發者ID:nkscoder,項目名稱:chawri,代碼行數:34,代碼來源:MY_Email.php

示例2: __construct

 /**
  * Constructor
  *
  * @access public
  * @return void
  */
 public function __construct($config = array())
 {
     //set the user agent to tomatocart
     $this->useragent = 'TomatoCart';
     //set mail protocol
     $this->protocol = EMAIL_TRANSPORT;
     //set smpt account info
     $this->smtp_host = SMTP_HOST;
     $this->smtp_user = SMTP_USERNAME;
     $this->smtp_pass = SMTP_PASSWORD;
     $this->smtp_port = SMTP_PORT;
     $this->smtp_timeout = 30;
     //set the smpt encryption
     if (EMAIL_SSL == '1') {
         $this->smtp_crypto = "ssl";
     }
     //set emial line feed
     if (EMAIL_LINEFEED == 'CRLF') {
         $this->newline = "\r\n";
         $this->crlf = "\r\n";
     }
     //set the email formatting
     if (EMAIL_USE_HTML == '1') {
         $this->mailtype = 'html';
     }
     //set the send out emails flag
     if (SEND_EMAILS == '1') {
         $this->_send_out = TRUE;
     }
     //set the default from email address
     $this->from(STORE_OWNER_EMAIL_ADDRESS, STORE_OWNER);
     parent::__construct($config);
 }
開發者ID:colonia,項目名稱:tomatocart-v2,代碼行數:39,代碼來源:TOC_Email.php

示例3:

 /**
  * Constructor
  *
  */
 function __construct()
 {
     // Call the Email Constructor
     parent::__construct();
     // Create an instance to CI
     $this->CI =& get_instance();
     // Retrieve the email protocol
     $config['protocol'] = $this->CI->ClanCMS->get_setting('email_protocol');
     // Configure sendmail settings
     if ($config['protocol'] == 'sendmail') {
         // Check the sendmail path
         if ($this->CI->ClanCMS->get_setting('email_sendmail_path') == '') {
             // Set mail path
             $config['mailpath'] = '/usr/sbin/sendmail';
         } else {
             // Set mail path
             $config['mailpath'] = $this->CI->ClanCMS->get_setting('email_sendmail_path');
         }
     }
     // Configure smtp settings
     if ($config['protocol'] == 'smtp') {
         // Configure additional settings
         $config['smtp_host'] = $this->CI->ClanCMS->get_setting('email_smtp_host');
         $config['smtp_user'] = $this->CI->ClanCMS->get_setting('email_smtp_user');
         $config['smtp_pass'] = $this->CI->ClanCMS->get_setting('email_smtp_pass');
         $config['smtp_port'] = $this->CI->ClanCMS->get_setting('email_smtp_port');
         $config['smtp_timeout'] = '30';
         $config['charset'] = 'utf-8';
         $config['newline'] = "\r\n";
     }
     // Initialize settings
     $this->initialize($config);
 }
開發者ID:BsWiM,項目名稱:The-Clan-CMS-Project,代碼行數:37,代碼來源:ClanCMS_Email.php

示例4: __construct

 /**
  * Constructor method
  * 
  * @return void
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     //set mail protocol
     $config['protocol'] = Settings::get('mail_protocol');
     //set a few config items (duh)
     $config['mailtype'] = "html";
     $config['charset'] = "utf-8";
     $config['crlf'] = Settings::get('mail_line_endings') ? "\r\n" : PHP_EOL;
     $config['newline'] = Settings::get('mail_line_endings') ? "\r\n" : PHP_EOL;
     //sendmail options
     if (Settings::get('mail_protocol') == 'sendmail') {
         if (Settings::get('mail_sendmail_path') == '') {
             //set a default
             $config['mailpath'] = '/usr/sbin/sendmail';
         } else {
             $config['mailpath'] = Settings::get('mail_sendmail_path');
         }
     }
     //smtp options
     if (Settings::get('mail_protocol') == 'smtp') {
         $config['smtp_host'] = Settings::get('mail_smtp_host');
         $config['smtp_user'] = Settings::get('mail_smtp_user');
         $config['smtp_pass'] = Settings::get('mail_smtp_pass');
         $config['smtp_port'] = Settings::get('mail_smtp_port');
     }
     $this->initialize($config);
 }
開發者ID:nockout,項目名稱:tshpro,代碼行數:33,代碼來源:MY_Email.php

示例5:

 /**
  * Constructor method
  *
  * @access public
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     $this->ci =& get_instance();
     //set mail protocol
     $config['protocol'] = $this->ci->settings->mail_protocol;
     //set a few config items (duh)
     $config['mailtype'] = 'html';
     $config['charset'] = 'utf-8';
     $config['crlf'] = '\\r\\n';
     $config['newline'] = '\\r\\n';
     //sendmail options
     if ($this->ci->settings->mail_protocol == 'sendmail') {
         if ($this->ci->settings->mail_sendmail_path == '') {
             //set a default
             $config['mailpath'] = '/usr/sbin/sendmail';
         } else {
             $config['mailpath'] = $this->ci->settings->mail_sendmail_path;
         }
     }
     //smtp options
     if ($this->ci->settings->mail_protocol == 'smtp') {
         $config['smtp_host'] = $this->ci->settings->mail_smtp_host;
         $config['smtp_user'] = $this->ci->settings->mail_smtp_user;
         $config['smtp_pass'] = $this->ci->settings->mail_smtp_pass;
         $config['smtp_port'] = $this->ci->settings->mail_smtp_port;
     }
     $this->initialize($config);
 }
開發者ID:vmichnowicz,項目名稱:pyrocms,代碼行數:35,代碼來源:MY_Email.php

示例6: __construct

 public function __construct(array $config = array())
 {
     parent::__construct($config);
     $this->CI =& get_instance();
     $this->CI->load->helper('file');
     $this->CI->load->model('Shared/Environment');
     $this->set_newline("\r\n");
 }
開發者ID:CodingWorkshop,項目名稱:IEnglishTutors,代碼行數:8,代碼來源:IET_Email.php

示例7: __construct

 /**
  * Extended constructor, which will first load default e-mail configuration from config file and then merge it with provided custom configuration.
  * It will also load all default addresses to internal variable.
  * @param array<mixed> $config configuration options.
  */
 public function __construct($config = array())
 {
     $this->CI =& get_instance();
     $config_default = $this->CI->config->item('email');
     $config = array_merge($config_default, $config);
     parent::__construct($config);
     $this->default_addresses = $this->CI->config->item('email_address');
 }
開發者ID:andrejjursa,項目名稱:list-lms,代碼行數:13,代碼來源:LIST_Email.php

示例8: array

 function __construct($config = array())
 {
     parent::__construct($config);
     // If defined in the config set from/name
     if (isset($config['from'])) {
         $from = $config['from'];
         $name = isset($config['name']) ? $config['name'] : '';
         $this->from($from, $name);
     }
 }
開發者ID:git-ecorise,項目名稱:snp,代碼行數:10,代碼來源:EXT_Email.php

示例9:

 /**
  * Constructor
  */
 function __construct($init = TRUE)
 {
     parent::__construct();
     if ($init != TRUE) {
         return;
     }
     // Make a local reference to the ExpressionEngine super object
     $this->EE =& get_instance();
     $this->EE_initialize();
 }
開發者ID:realfluid,項目名稱:umbaugh,代碼行數:13,代碼來源:EE_Email.php

示例10: __construct

 /**
  * Replacement of CI_Email construct method.
  * Added: merge config variables with default app_email config variables.
  *
  * @param array $config Config settings (same as the CI_Email config) [ optional ]
  */
 public function __construct($config = array())
 {
     $this->ci =& get_instance();
     $this->ci->load->language('email');
     // load default config from config folder and merge with construct input config
     $this->ci->load->config('app_email', TRUE);
     // if config is null
     $config = !is_array($config) ? array() : $config;
     $this->_config = array_merge($this->ci->config->item('app_email'), $config);
     parent::__construct($this->_config);
 }
開發者ID:BitmanNL,項目名稱:traffictower-cms,代碼行數:17,代碼來源:App_email.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     // get the CodeIgniter Object
     $CI =& get_instance();
     // load config
     $CI->load->config('postmark');
     // load helpers
     $CI->load->helper('file');
     $this->api_key = $CI->config->item('postmark_api_key');
 }
開發者ID:ramirors,項目名稱:DD-Auth,代碼行數:11,代碼來源:Postmark.php

示例12:

 /**
  * Constructor - Sets Email Preferences
  *
  * The constructor can be passed an array of config values
  */
 function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
     $this->protocol = $this->CI->config->item('email_protocal') ? $this->CI->config->item('email_protocal') : 'mail';
     // mail/sendmail/smtp
     $this->smtp_host = $this->CI->config->item('email_smtp_host');
     // SMTP Server. Example: mail.earthlink.net
     $this->smtp_user = $this->CI->config->item('email_smtp_user');
     // SMTP Username
     $this->smtp_pass = $this->CI->config->item('email_smtp_pass');
     // SMTP Password
     $this->smtp_port = $this->CI->config->item('email_smtp_port');
     // SMTP Port
     $this->smtp_crypto = $this->CI->config->item('email_smtp_crypto');
     // SMTP Encryption. Can be null, tls or ssl.
     $this->mailtype = 'html';
 }
開發者ID:smboy86,項目名稱:zzing,代碼行數:23,代碼來源:CB_Email.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->CI =& get_instance();
 }
開發者ID:iweave,項目名稱:unmark,代碼行數:5,代碼來源:Plain_Email.php

示例14:

 function __construct()
 {
     parent::__construct();
 }
開發者ID:srsman,項目名稱:89jian,代碼行數:4,代碼來源:LB_Email.php

示例15:

 function __construct()
 {
     parent::__construct();
     $CI =& get_instance();
 }
開發者ID:anhnt0212,項目名稱:admin-codeigniter-fw,代碼行數:5,代碼來源:my_email.php


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