65 if (!is_object($this->oauth)) {
67 $this->oauthUserEmail,
68 $this->oauthClientSecret,
70 $this->oauthRefreshToken
87 if (is_null($this->smtp)) {
91 if (is_null($this->oauth)) {
96 if ($this->smtp->connected()) {
100 $this->smtp->setTimeout($this->Timeout);
101 $this->smtp->setDebugLevel($this->SMTPDebug);
102 $this->smtp->setDebugOutput($this->Debugoutput);
103 $this->smtp->setVerp($this->do_verp);
104 $hosts = explode(
';', $this->Host);
105 $lastexception = null;
107 foreach ($hosts as $hostentry) {
109 if (!preg_match(
'/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) {
120 $tls = ($this->SMTPSecure ==
'tls');
121 if (
'ssl' == $hostinfo[2]
or (
'' == $hostinfo[2]
and 'ssl' == $this->SMTPSecure)) {
125 } elseif ($hostinfo[2] ==
'tls') {
131 $sslext =
defined(
'OPENSSL_ALGO_SHA1');
132 if (
'tls' === $secure
or 'ssl' === $secure) {
138 $host = $hostinfo[3];
140 $tport = (integer)$hostinfo[4];
141 if ($tport > 0
and $tport < 65536) {
144 if ($this->smtp->connect($prefix . $host, $port, $this->Timeout,
$options)) {
151 $this->smtp->hello($hello);
157 if ($this->SMTPAutoTLS
and $sslext
and $secure !=
'ssl' and $this->smtp->getServerExt(
'STARTTLS')) {
161 if (!$this->smtp->startTLS()) {
165 $this->smtp->hello($hello);
167 if ($this->SMTPAuth) {
168 if (!$this->smtp->authenticate(
182 $lastexception = $exc;
183 $this->
edebug($exc->getMessage());
190 $this->smtp->close();
193 throw $lastexception;
exceptions()
Get all exception thrown sofar and reset the logger.
getOAUTHInstance()
Get a PHPMailerOAuthGoogle instance to use.
PHPMailer - PHP email creation and transport class.
edebug($str)
Output debugging info via user-defined method.
if(!is_array($argv)) $options
serverHostname()
Get the server hostname.
Create styles array
The data for the language used.
smtpConnect($options=array())
Initiate a connection to an SMTP server.
getSMTPInstance()
Get an instance to use for SMTP operations.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
lang($key)
Get an error message in the current language.