本文整理汇总了PHP中SMTP::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SMTP::__construct方法的具体用法?PHP SMTP::__construct怎么用?PHP SMTP::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMTP
的用法示例。
在下文中一共展示了SMTP::__construct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Direct invocation of the constructor is not permitted.
*/
protected function __construct(array $config)
{
$config['smtp_host'] = 'smtp.sendgrid.net';
$config['smtp_port'] = 465;
$config['smtp_security'] = 'ssl';
$config['smtp_user'] = $config['api_user'];
$config['smtp_pass'] = $config['api_pass'];
parent::__construct($config);
}
示例2: __construct
/**
* Direct invocation of the constructor is not permitted.
*/
protected function __construct(array $config)
{
$config['smtp_host'] = 'smtp.postmarkapp.com';
$config['smtp_port'] = 587;
$config['smtp_security'] = 'tls';
$config['smtp_user'] = $config['api_token'];
$config['smtp_pass'] = $config['api_token'];
parent::__construct($config);
}
示例3: __construct
public function __construct()
{
$host = Controller::getEnvironmentData('SMTP_HOST');
$port = Controller::getEnvironmentData('SMTP_PORT');
$scheme = Controller::getEnvironmentData('SMTP_SCHEME');
$user = Controller::getEnvironmentData('SMTP_USER');
$pw = Controller::getEnvironmentData('SMTP_PASS');
parent::__construct($host, $port, $scheme, $user, $pw);
// error handling
$this->set('Errors-to', '' . Controller::getEnvironmentData('SMTP_ERROR') . '>');
$this->set('MIME-Version', '1.0');
$this->set('Content-Type', 'text/html; charset=ISO-8859-1');
}