当前位置: 首页>>代码示例>>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;未经允许,请勿转载。