function MimeMailPHPMailer::MimeMailPHPMailer in PHPMailer 6
Same name and namespace in other branches
- 5 includes/mimemail.inc \MimeMailPHPMailer::MimeMailPHPMailer()
Constructor.
File
- includes/
mimemail.inc, line 19
Class
Code
function MimeMailPHPMailer() {
$this
->IsSMTP();
$this
->Reset();
$protocol = variable_get('smtp_protocol', '');
$this->Host = $protocol . variable_get('smtp_host', '');
if ($backup = variable_get('smtp_hostbackup', '')) {
$this->Host .= ';' . $protocol . $backup;
}
$this->Port = variable_get('smtp_port', '25');
// Use SMTP authentication if both username and password are given.
$this->Username = variable_get('smtp_username', '');
$this->Password = variable_get('smtp_password', '');
$this->SMTPAuth = (bool) ($this->Username != '' && $this->Password != '');
$this->SMTPKeepAlive = variable_get('smtp_keepalive', 0);
$this->SMTPDebug = variable_get('smtp_debug', 0);
// Adjust path to SMTP class.
$this->PluginDir = drupal_get_path('module', 'phpmailer') . '/phpmailer/';
}