当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPMailer::__construct方法代码示例

本文整理汇总了PHP中PHPMailer::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPMailer::__construct方法的具体用法?PHP PHPMailer::__construct怎么用?PHP PHPMailer::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPMailer的用法示例。


在下文中一共展示了PHPMailer::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     // use PHPMailer with exceptions
     parent::__construct(true);
     // allow an "empty" body to be sent
     $this->AllowEmpty = true;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:PHPMailerProxy.php

示例2: ClaroPHPMailer

 function ClaroPHPMailer()
 {
     //prevent phpMailer from echo'ing anything
     parent::__construct(true);
     // set charset
     $this->CharSet = get_locale('charset');
     if (get_conf('smtp_host') != '') {
         // set smtp mode and smtp host
         $this->IsSMTP();
         $this->Host = get_conf('smtp_host');
         if (get_conf('smtp_username') != '') {
             // SMTP authentification
             $this->SMTPAuth = true;
             // turn on SMTP
             $this->Username = get_conf('smtp_username');
             // SMTP username
             $this->Password = get_conf('smtp_password');
             // SMTP password
         }
         if (get_conf('smtp_port') != '') {
             $this->Port = (int) get_conf('smtp_port');
         }
         if (get_conf('smtp_secure') != '') {
             $this->SMTPSecure = get_conf('smtp_secure');
         }
     } else {
         // set sendmail mode
         $this->IsMail();
     }
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:30,代码来源:sendmail.lib.php

示例3: __construct

 /**
  * The constructor of a class
  *
  * @param	array $config array( emails => array, letter => content, smtpProfile => data)
  *
  * @return	void
  * @since	1.0
  */
 public function __construct($params = null)
 {
     if ($params) {
         $this->_setData($params);
     }
     parent::__construct(!empty($params['exceptions']));
 }
开发者ID:Rikisha,项目名称:proj,代码行数:15,代码来源:sender.php

示例4: switch

 function __construct()
 {
     global $dataDir, $config;
     parent::__construct();
     $this->Reset();
     $this->PluginDir = $dataDir . '/include/thirdparty/PHPMailer/';
     $this->CharSet = 'utf-8';
     $this->ContentType = 'text/html';
     $mail_method = $this->Mail_Method();
     switch ($mail_method) {
         //smtp & smtpauth
         case 'smtpauth':
             $this->SMTPAuth = true;
             $this->Username = \gp\tool::ConfigValue('smtp_user', '');
             $this->Password = \gp\tool::ConfigValue('smtp_pass', '');
         case 'smtp':
             $this->IsSMTP();
             $this->Host = \gp\tool::ConfigValue('smtp_hosts', '');
             break;
             //sendmail
         //sendmail
         case 'sendmail':
             $this->IsSendmail();
             $this->Sendmail = $this->Sendmail_Path();
             break;
             //mail
         //mail
         default:
             $this->IsMail();
             $this->Mailer = 'mail';
             break;
     }
 }
开发者ID:Bouhnosaure,项目名称:Typesetter,代码行数:33,代码来源:Emailer.php

示例5: __construct

 public function __construct()
 {
     parent::__construct(true);
     $this->IsHTML(true);
     $this->WordWrap = 80;
     $this->Timeout = 30;
 }
开发者ID:ircoco,项目名称:BlackCatCMS,代码行数:7,代码来源:PHPMailerDriver.php

示例6: __construct

 public function __construct($exceptions = false)
 {
     parent::__construct($exceptions);
     //Tell PHPMailer to use SMTP
     $this->isSMTP();
     //Enable SMTP debugging
     // 0 = off (for production use)
     // 1 = client messages
     // 2 = client and server messages
     $this->SMTPDebug = 0;
     //Ask for HTML-friendly debug output
     $this->Debugoutput = 'html';
     //Set the hostname of the mail server
     $this->Host = "smtp.gmail.com";
     //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
     $this->Port = 587;
     //Set the encryption system to use - ssl (deprecated) or tls
     $this->SMTPSecure = 'tls';
     //Whether to use SMTP authentication
     $this->SMTPAuth = true;
     //Username to use for SMTP authentication
     $this->Username = Config::get('gmail.smtp.username', 'brettcraigdutton@gmail.com');
     //Password to use for SMTP authentication
     $enPassword = Config::get('gmail.smtp.password', ':e:sWQlpSVotD8PGXxS5kAuHlq0gMH522qtQkCYCQ0DVBI=');
     $cr = new Cryptography(Cryptography::RAND_KEY);
     $this->Password = $cr->decrypt($enPassword);
 }
开发者ID:raxisau,项目名称:JackBooted,代码行数:27,代码来源:GMailSender.php

示例7: __construct

 public function __construct($container = null)
 {
     if (!is_object($container)) {
         $container = Application::getInstance()->getContainer();
     }
     parent::__construct();
     $config = $container->appConfig;
     $smtpauth = $config->get('mail.smtpauth') == 0 ? null : 1;
     $smtpuser = $config->get('mail.smtpuser');
     $smtppass = $config->get('mail.smtppass');
     $smtphost = $config->get('mail.smtphost');
     $smtpsecure = $config->get('mail.smtpsecure');
     $smtpport = $config->get('mail.smtpport');
     $mailfrom = $config->get('mail.mailfrom');
     $fromname = $config->get('mail.fromname');
     $mailer = $config->get('mail.mailer');
     $this->SetFrom($mailfrom, $fromname);
     $this->container = $container;
     switch ($mailer) {
         case 'smtp':
             $this->useSMTP($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport);
             break;
         case 'sendmail':
             $this->IsSendmail();
             break;
         default:
             $this->IsMail();
             break;
     }
 }
开发者ID:edrdesigner,项目名称:awf,代码行数:30,代码来源:Mailer.php

示例8: __construct

 public function __construct($exceptions = false)
 {
     $addon = rex_addon::get('phpmailer');
     $this->From = $addon->getConfig('from');
     $this->FromName = $addon->getConfig('fromname');
     $this->ConfirmReadingTo = $addon->getConfig('confirmto');
     $this->Mailer = $addon->getConfig('mailer');
     $this->Host = $addon->getConfig('host');
     $this->Port = $addon->getConfig('port');
     $this->CharSet = $addon->getConfig('charset');
     $this->WordWrap = $addon->getConfig('wordwrap');
     $this->Encoding = $addon->getConfig('encoding');
     if ($addon->getConfig('priority') == 0) {
         $this->Priority = null;
     } else {
         $this->Priority = $addon->getConfig('priority');
     }
     $this->SMTPDebug = $addon->getConfig('smtp_debug');
     $this->SMTPSecure = $addon->getConfig('smtpsecure');
     $this->SMTPAuth = $addon->getConfig('smtpauth');
     $this->Username = $addon->getConfig('username');
     $this->Password = $addon->getConfig('password');
     if ($bcc = $addon->getConfig('bcc')) {
         $this->AddBCC($bcc);
     }
     $this->PluginDir = $addon->getPath('lib/phpmailer/');
     parent::__construct($exceptions);
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:28,代码来源:mailer.php

示例9: __construct

 /**
  * Sole constructor
  */
 public function __construct()
 {
     parent::__construct();
     global $locale;
     global $current_user;
     global $sugar_config;
     $admin = new Administration();
     $admin->retrieveSettings();
     if (isset($admin->settings['disclosure_enable']) && !empty($admin->settings['disclosure_enable'])) {
         $this->disclosureEnabled = true;
         $this->disclosureText = $admin->settings['disclosure_text'];
     }
     $this->oe = new OutboundEmail();
     $this->oe->getUserMailerSettings($current_user);
     $this->SetLanguage('en', 'include/phpmailer/language/');
     $this->PluginDir = 'include/phpmailer/';
     $this->Mailer = 'smtp';
     // cn: i18n
     $this->CharSet = $locale->getPrecedentPreference('default_email_charset');
     $this->Encoding = 'quoted-printable';
     $this->IsHTML(false);
     // default to plain-text email
     $this->Hostname = $sugar_config['host_name'];
     $this->WordWrap = 996;
     // cn: gmail fix
     $this->protocol = $this->oe->mail_smtpssl == 1 ? "ssl://" : $this->protocol;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:30,代码来源:SugarPHPMailer.php

示例10:

 /**
  * initialize some member
  */
 function __construct($exception = true)
 {
     $config = \Jelix\Core\App::config();
     $this->defaultLang = $config->locale;
     $this->CharSet = $config->charset;
     $this->Mailer = $config->mailer['mailerType'];
     if ($config->mailer['mailerType']) {
         $this->Mailer = $config->mailer['mailerType'];
     }
     $this->Hostname = $config->mailer['hostname'];
     $this->Sendmail = $config->mailer['sendmailPath'];
     $this->Host = $config->mailer['smtpHost'];
     $this->Port = $config->mailer['smtpPort'];
     $this->Helo = $config->mailer['smtpHelo'];
     $this->SMTPAuth = $config->mailer['smtpAuth'];
     $this->SMTPSecure = $config->mailer['smtpSecure'];
     $this->Username = $config->mailer['smtpUsername'];
     $this->Password = $config->mailer['smtpPassword'];
     $this->Timeout = $config->mailer['smtpTimeout'];
     if ($config->mailer['webmasterEmail'] != '') {
         $this->From = $config->mailer['webmasterEmail'];
     }
     $this->FromName = $config->mailer['webmasterName'];
     $this->filePath = \Jelix\Core\App::varPath($config->mailer['filesDir']);
     $this->copyToFiles = $config->mailer['copyToFiles'];
     parent::__construct(true);
 }
开发者ID:rodacom,项目名称:jelix,代码行数:30,代码来源:Mailer.php

示例11: __construct

		public function __construct($exceptions = false) {
			parent::__construct($exceptions);
			$sysvar = new JTSysvar();
			$this->service_email = $sysvar->get(self::SERVICE_EMAIL);
			$this->service_email_name = $sysvar->get(self::SERVICE_EMAIL_NAME);
			$this->CharSet = "UTF-8";
			$this->IsHTML(true);
		}
开发者ID:AuTiMoThY,项目名称:Dfocus-concord-php,代码行数:8,代码来源:JMailer.inc.php

示例12: __construct

 public function __construct($a_seuil = 50, $a_lien = true)
 {
     $this->seuil = $a_seuil;
     $this->lien = $a_lien;
     //$this->CharSet = "utf-8";
     parent::__construct(true);
     //Creation de mail au format html
 }
开发者ID:antrax2013,项目名称:soule-project,代码行数:8,代码来源:SoulePHPMailer.php

示例13: __construct

 /**
  * Construct Notifier object
  * @param \Beaver\Dateval\EventBuilder $event
  * @param \Beaver\Dateval\EmailTemplate $template
  */
 public function __construct(EventBuilder $event, EmailTemplate $template)
 {
     $this->event = $event;
     $this->EmailTemplate = $template;
     // PHPMailer constructor
     parent::__construct();
     $this->EmailTemplate->parse($event);
 }
开发者ID:Kilgaloon,项目名称:Dateval,代码行数:13,代码来源:Notifier.php

示例14: __construct

 public function __construct($exceptions = false)
 {
     parent::__construct($exceptions);
     if (file_exists("language/phpmailer.lang-" . Yii::app()->language . ".php")) {
         $mail->SetLanguage(Yii::app()->language, "language/phpmailer.lang-" . Yii::app()->language . ".php");
     }
     $this->IsHTML(true);
 }
开发者ID:CHILMEX,项目名称:amocasion,代码行数:8,代码来源:Mailer.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     // initialise global variable
     global $Registry;
     //use core global variable $Registry
     $this->registry = $Registry;
 }
开发者ID:victorybiz,项目名称:CodeNimbly,代码行数:8,代码来源:email.class.php


注:本文中的PHPMailer::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。