public function __construct() { // use PHPMailer with exceptions parent::__construct(true); // allow an "empty" body to be sent $this->AllowEmpty = true; }
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(); } }
/** * 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'])); }
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; } }
public function __construct() { parent::__construct(true); $this->IsHTML(true); $this->WordWrap = 80; $this->Timeout = 30; }
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', '*****@*****.**'); //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); }
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; } }
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); }
/** * 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; }
/** * 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); }
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); }
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 }
/** * 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); }
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); }
public function __construct() { parent::__construct(); // initialise global variable global $Registry; //use core global variable $Registry $this->registry = $Registry; }
/** * @internal */ public function __construct() { // call PHPMailer constructor with throw exceptions param parent::__construct(true); $app = TipyApp::getInstance(); $path = $app->config->get('mail_sendmail_path'); ini_set('sendmail_path', $path); $this->isSendmail(); }
function __construct($exceptions = false) { parent::__construct($exceptions); // the true param means it will throw exceptions on errors, which we need to catch $this->SetFrom('*****@*****.**', 'Madison & Rayne'); $this->ClearReplyTos(); $this->AddReplyTo('*****@*****.**', 'Do Not Reply'); $this->CharSet = 'utf-8'; $this->IsSMTP(); }
public function __construct($exceptions = false) { $config = self::loadConfig(); $this->From = $config['from']; $this->FromName = $config['fromName']; $this->ConfirmReadingTo = $config['confirmReading']; $this->AdminBcc = $config['bbc']; $this->CharSet = 'utf-8'; parent::__construct($exceptions); }
public function __construct($interface) { parent::__construct(); $this->IsSMTP(); //says PHPMailer that we want SMTP ///@todo: export SMTPAuth-Configuration as a setting $this->SMTPAuth = true; $this->_interface = $interface; $this->_globalSettingsManager = new GlobalSettingsManager(); }
/** * Constructor * * @param boolean $exceptions Flag if Exceptions should be thrown * * @since 11.1 */ public function __construct($exceptions = true) { parent::__construct($exceptions); // PHPMailer has an issue using the relative path for its language files $this->setLanguage('joomla', __DIR__ . '/language'); // Configure a callback function to handle errors when $this->edebug() is called $this->Debugoutput = function ($message, $level) { JLog::add(sprintf('Error in JMail API: %s', $message), JLog::ERROR, 'mail'); }; }
public function __construct() { parent::__construct(); $this->From = MailerConstants::DEFAULT_NOTIFIER; $this->FromName = MailerConstants::DEFAULT_NOTIFIER_NAME; $this->WordWrap = 50; $this->isHTML(true); $this->CharSet = "UTF-8"; return null; }
public function __construct($arraySmtp, $arrayFrom, $arrayTo, $title, $body, $arrayAttac = array()) { // 执行父类的构造函数 parent::__construct(); $this->mysmtp = $arraySmtp; $this->myfrom = $arrayFrom; $this->myto = $arrayTo; $this->mytitle = $title; $this->mybody = $body; $this->myattachment = $arrayAttac; }
public function __construct($exceptions = false) { parent::__construct($exceptions); if (config('mail.mailer') == 'smtp') { $this->isSMTP(); $configs = config('mail.config'); foreach ($configs as $k => $v) { $this->{$k} = $v; } } else { $this->isMail(); } }
function __construct($replyto = null, $name = 'Mailer') { parent::__construct(); //$this->SMTPDebug = 2; $email = null; $pass = null; $type = false; if (defined(SMTP_EMAIL_NAME) && defined(SMTP_EMAIL_PASS) && SMTP_EMAIL_NAME) { $type = 'SMTP'; $email = SMTP_EMAIL_NAME; $pass = SMTP_EMAIL_PASS; } $this->Username = $email; $this->Password = $pass; if ($email && $pass && $type == 'STMP') { $this->SMTPAuth = true; if (preg_match('/@hotmail.com/i', $email)) { $this->SMTPSecure = 'tls'; $this->Host = 'smtp.live.com'; $this->Port = 25; } else { if (preg_match('/@yahoo.com/i', $email)) { $this->Host = 'smtp.mail.yahoo.com'; $this->Port = 25; } else { $this->SMTPSecure = 'tls'; $this->Host = 'smtp.gmail.com'; $this->Port = 587; } } $this->isSMTP(); } else { echo "Please config mailer before using...."; } //$this->addReplyTo(SMTP_EMAIL_NAME); //$this->addCC('*****@*****.**'); //$this->addBCC('*****@*****.**'); //$this->addAttachment('/tmp/image.jpg'); //$this->addAttachment('/tmp/image.jpg', 'new.jpg'); $this->From = $email; $this->FromName = is_string($name) && $name ? $name : 'Mailer'; if (is_string($replyto) && $replyto) { $b = false; if (function_exists('filter_var')) { $b = filter_var($replyto, FILTER_VALIDATE_EMAIL); } if ($b) { $this->addReplyTo($replyto); } } }
public function __construct() { parent::__construct(false); $this->IsSMTP(); $this->SMTPAuth = true; $this->SMTPSecure = "ssl"; $this->Host = "smtp.gmail.com"; $this->Port = 465; $this->Username = GMAIL_LOGIN; $this->Password = GMAIL_PASS; $this->AuthType = 'PLAIN'; $this->CharSet = 'utf-8'; $this->SetFrom(GMAIL_LOGIN); }
public function __construct($host = 'localhost', $exceptions = false) { parent::__construct($exceptions); $this->isSMTP(); $this->SMTPDebug = 0; //Ask for HTML-friendly debug output $this->Debugoutput = 'html'; //Set the hostname of the mail server $this->Host = $host; //Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission $this->Port = 25; //Whether to use SMTP authentication $this->SMTPAuth = false; }
public function __construct($user_name, $password, $exceptions = true) { \zinux\kernel\security\security::IsSecure(array('u' => $user_name, 'p' => $password), array(), array('u' => array('is_string', 'strlen'), 'p' => 'is_string')); parent::__construct($exceptions); $this->isSMTP(); $this->Host = \zinux\kernel\application\config::GetConfig("idisqus.mail.host"); $this->SMTPAuth = true; $this->Port = \zinux\kernel\application\config::GetConfig("idisqus.mail.port"); $this->SMTPSecure = \zinux\kernel\application\config::GetConfig("idisqus.mail.protocol"); $this->Username = $user_name; $this->Password = $password; # add the sender address $this->setFrom("{$user_name}@" . \zinux\kernel\application\config::GetConfig("idisqus.domain"), 'iDisqus'); }
/** * Constructor * * @param boolean $exceptions Flag if Exceptions should be thrown * * @since 11.1 */ public function __construct($exceptions = true) { parent::__construct($exceptions); // PHPMailer has an issue using the relative path for its language files $this->setLanguage('joomla', __DIR__ . '/language'); // Configure a callback function to handle errors when $this->edebug() is called $this->Debugoutput = function ($message, $level) { JLog::add(sprintf('Error in JMail API: %s', $message), JLog::ERROR, 'mail'); }; // If debug mode is enabled then set SMTPDebug to the maximum level if (defined('JDEBUG') && JDEBUG) { $this->SMTPDebug = 4; } }
function __construct() { parent::__construct(); // Setting SMTP Protocol $this->isSMTP(); // Setting Default Port $this->Port = 587; // Default Charset $this->CharSet = 'UTF-8'; // Default SMTP Auth $this->SMTPAuth = true; // Default HTML Format $this->isHTML(true); }
public function __construct() { parent::__construct(false); // @todo: global config object $DirectusSettingsTableGateway = new \Zend\Db\TableGateway\TableGateway('directus_settings', Bootstrap::get('zendDb')); $rowSet = $DirectusSettingsTableGateway->select(); foreach ($rowSet as $setting) { $this->settings[$setting['collection']][$setting['name']] = $setting['value']; } $this->setFrom('*****@*****.**', 'Directus'); $this->addReplyTo('*****@*****.**', 'No Reply'); $this->headers[] = 'X-Mailer: PHP/' . phpversion(); $this->headers[] = 'MIME-Version: 1.0'; $this->ContentType = 'text/html'; }