PHPMailer 5.2.19 버전 적용
This commit is contained in:
@ -1 +1 @@
|
|||||||
5.2.14
|
5.2.19
|
||||||
@ -31,7 +31,7 @@ class PHPMailer
|
|||||||
* The PHPMailer Version number.
|
* The PHPMailer Version number.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.14';
|
public $Version = '5.2.19';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email priority.
|
* Email priority.
|
||||||
@ -201,6 +201,9 @@ class PHPMailer
|
|||||||
/**
|
/**
|
||||||
* An ID to be used in the Message-ID header.
|
* An ID to be used in the Message-ID header.
|
||||||
* If empty, a unique id will be generated.
|
* If empty, a unique id will be generated.
|
||||||
|
* You can set your own, but it must be in the format "<id@domain>",
|
||||||
|
* as defined in RFC5322 section 3.6.4 or it will be ignored.
|
||||||
|
* @see https://tools.ietf.org/html/rfc5322#section-3.6.4
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $MessageID = '';
|
public $MessageID = '';
|
||||||
@ -285,7 +288,7 @@ class PHPMailer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP auth type.
|
* SMTP auth type.
|
||||||
* Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5
|
* Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $AuthType = '';
|
public $AuthType = '';
|
||||||
@ -352,6 +355,7 @@ class PHPMailer
|
|||||||
/**
|
/**
|
||||||
* Whether to split multiple to addresses into multiple messages
|
* Whether to split multiple to addresses into multiple messages
|
||||||
* or send them all in one message.
|
* or send them all in one message.
|
||||||
|
* Only supported in `mail` and `sendmail` transports, not in SMTP.
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
public $SingleTo = false;
|
public $SingleTo = false;
|
||||||
@ -394,7 +398,7 @@ class PHPMailer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* DKIM Identity.
|
* DKIM Identity.
|
||||||
* Usually the email address used as the source of the email
|
* Usually the email address used as the source of the email.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $DKIM_identity = '';
|
public $DKIM_identity = '';
|
||||||
@ -419,6 +423,13 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public $DKIM_private = '';
|
public $DKIM_private = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DKIM private key string.
|
||||||
|
* If set, takes precedence over `$DKIM_private`.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $DKIM_private_string = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Action function name.
|
* Callback Action function name.
|
||||||
*
|
*
|
||||||
@ -446,6 +457,15 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public $XMailer = '';
|
public $XMailer = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Which validator to use by default when validating email addresses.
|
||||||
|
* May be a callable to inject your own validator, but there are several built-in validators.
|
||||||
|
* @see PHPMailer::validateAddress()
|
||||||
|
* @var string|callable
|
||||||
|
* @static
|
||||||
|
*/
|
||||||
|
public static $validator = 'auto';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An instance of the SMTP sender class.
|
* An instance of the SMTP sender class.
|
||||||
* @var SMTP
|
* @var SMTP
|
||||||
@ -634,9 +654,11 @@ class PHPMailer
|
|||||||
* Constructor.
|
* Constructor.
|
||||||
* @param boolean $exceptions Should we throw external exceptions?
|
* @param boolean $exceptions Should we throw external exceptions?
|
||||||
*/
|
*/
|
||||||
public function __construct($exceptions = false)
|
public function __construct($exceptions = null)
|
||||||
{
|
{
|
||||||
$this->exceptions = (boolean)$exceptions;
|
if ($exceptions !== null) {
|
||||||
|
$this->exceptions = (boolean)$exceptions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -645,9 +667,7 @@ class PHPMailer
|
|||||||
public function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
//Close any open SMTP connection nicely
|
//Close any open SMTP connection nicely
|
||||||
if ($this->Mailer == 'smtp') {
|
$this->smtpClose();
|
||||||
$this->smtpClose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -671,14 +691,16 @@ class PHPMailer
|
|||||||
} else {
|
} else {
|
||||||
$subject = $this->encodeHeader($this->secureHeader($subject));
|
$subject = $this->encodeHeader($this->secureHeader($subject));
|
||||||
}
|
}
|
||||||
if (ini_get('safe_mode') || !($this->UseSendmailOptions)) {
|
|
||||||
|
//Can't use additional_parameters in safe_mode, calling mail() with null params breaks
|
||||||
|
//@link http://php.net/manual/en/function.mail.php
|
||||||
|
if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
|
||||||
$result = @mail($to, $subject, $body, $header);
|
$result = @mail($to, $subject, $body, $header);
|
||||||
} else {
|
} else {
|
||||||
$result = @mail($to, $subject, $body, $header, $params);
|
$result = @mail($to, $subject, $body, $header, $params);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Output debugging info via user-defined method.
|
* Output debugging info via user-defined method.
|
||||||
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
|
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
|
||||||
@ -713,7 +735,7 @@ class PHPMailer
|
|||||||
case 'echo':
|
case 'echo':
|
||||||
default:
|
default:
|
||||||
//Normalize line breaks
|
//Normalize line breaks
|
||||||
$str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
|
$str = preg_replace('/\r\n?/ms', "\n", $str);
|
||||||
echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
|
echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
|
||||||
"\n",
|
"\n",
|
||||||
"\n \t ",
|
"\n \t ",
|
||||||
@ -850,7 +872,7 @@ class PHPMailer
|
|||||||
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
|
||||||
if (($pos = strrpos($address, '@')) === false) {
|
if (($pos = strrpos($address, '@')) === false) {
|
||||||
// At-sign is misssing.
|
// At-sign is misssing.
|
||||||
$error_message = $this->lang('invalid_address') . $address;
|
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
$this->edebug($error_message);
|
$this->edebug($error_message);
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
@ -900,7 +922,7 @@ class PHPMailer
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!$this->validateAddress($address)) {
|
if (!$this->validateAddress($address)) {
|
||||||
$error_message = $this->lang('invalid_address') . $address;
|
$error_message = $this->lang('invalid_address') . " (addAnAddress $kind): $address";
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
$this->edebug($error_message);
|
$this->edebug($error_message);
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
@ -994,7 +1016,7 @@ class PHPMailer
|
|||||||
if (($pos = strrpos($address, '@')) === false or
|
if (($pos = strrpos($address, '@')) === false or
|
||||||
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
|
(!$this->has8bitChars(substr($address, ++$pos)) or !$this->idnSupported()) and
|
||||||
!$this->validateAddress($address)) {
|
!$this->validateAddress($address)) {
|
||||||
$error_message = $this->lang('invalid_address') . $address;
|
$error_message = $this->lang('invalid_address') . " (setFrom) $address";
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
$this->edebug($error_message);
|
$this->edebug($error_message);
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
@ -1027,19 +1049,30 @@ class PHPMailer
|
|||||||
/**
|
/**
|
||||||
* Check that a string looks like an email address.
|
* Check that a string looks like an email address.
|
||||||
* @param string $address The email address to check
|
* @param string $address The email address to check
|
||||||
* @param string $patternselect A selector for the validation pattern to use :
|
* @param string|callable $patternselect A selector for the validation pattern to use :
|
||||||
* * `auto` Pick best pattern automatically;
|
* * `auto` Pick best pattern automatically;
|
||||||
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
|
* * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14;
|
||||||
* * `pcre` Use old PCRE implementation;
|
* * `pcre` Use old PCRE implementation;
|
||||||
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
|
* * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
|
||||||
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
|
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
|
||||||
* * `noregex` Don't use a regex: super fast, really dumb.
|
* * `noregex` Don't use a regex: super fast, really dumb.
|
||||||
|
* Alternatively you may pass in a callable to inject your own validator, for example:
|
||||||
|
* PHPMailer::validateAddress('user@example.com', function($address) {
|
||||||
|
* return (strpos($address, '@') !== false);
|
||||||
|
* });
|
||||||
|
* You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
* @static
|
* @static
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public static function validateAddress($address, $patternselect = 'auto')
|
public static function validateAddress($address, $patternselect = null)
|
||||||
{
|
{
|
||||||
|
if (is_null($patternselect)) {
|
||||||
|
$patternselect = self::$validator;
|
||||||
|
}
|
||||||
|
if (is_callable($patternselect)) {
|
||||||
|
return call_user_func($patternselect, $address);
|
||||||
|
}
|
||||||
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
||||||
if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
|
if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) {
|
||||||
return false;
|
return false;
|
||||||
@ -1216,7 +1249,7 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||||
if (!$this->validateAddress($this->$address_kind)) {
|
if (!$this->validateAddress($this->$address_kind)) {
|
||||||
$error_message = $this->lang('invalid_address') . $this->$address_kind;
|
$error_message = $this->lang('invalid_address') . ' (punyEncode) ' . $this->$address_kind;
|
||||||
$this->setError($error_message);
|
$this->setError($error_message);
|
||||||
$this->edebug($error_message);
|
$this->edebug($error_message);
|
||||||
if ($this->exceptions) {
|
if ($this->exceptions) {
|
||||||
@ -1227,7 +1260,7 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set whether the message is multipart/alternative
|
// Set whether the message is multipart/alternative
|
||||||
if (!empty($this->AltBody)) {
|
if ($this->alternativeExists()) {
|
||||||
$this->ContentType = 'multipart/alternative';
|
$this->ContentType = 'multipart/alternative';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1261,9 +1294,11 @@ class PHPMailer
|
|||||||
|
|
||||||
// Sign with DKIM if enabled
|
// Sign with DKIM if enabled
|
||||||
if (!empty($this->DKIM_domain)
|
if (!empty($this->DKIM_domain)
|
||||||
&& !empty($this->DKIM_private)
|
|
||||||
&& !empty($this->DKIM_selector)
|
&& !empty($this->DKIM_selector)
|
||||||
&& file_exists($this->DKIM_private)) {
|
&& (!empty($this->DKIM_private_string)
|
||||||
|
|| (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
|
||||||
|
)
|
||||||
|
) {
|
||||||
$header_dkim = $this->DKIM_Add(
|
$header_dkim = $this->DKIM_Add(
|
||||||
$this->MIMEHeader . $this->mailHeader,
|
$this->MIMEHeader . $this->mailHeader,
|
||||||
$this->encodeHeader($this->secureHeader($this->Subject)),
|
$this->encodeHeader($this->secureHeader($this->Subject)),
|
||||||
@ -1329,7 +1364,7 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
protected function sendmailSend($header, $body)
|
protected function sendmailSend($header, $body)
|
||||||
{
|
{
|
||||||
if ($this->Sender != '') {
|
if (!empty($this->Sender)) {
|
||||||
if ($this->Mailer == 'qmail') {
|
if ($this->Mailer == 'qmail') {
|
||||||
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
||||||
} else {
|
} else {
|
||||||
@ -1404,17 +1439,17 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
$to = implode(', ', $toArr);
|
$to = implode(', ', $toArr);
|
||||||
|
|
||||||
if (empty($this->Sender)) {
|
$params = null;
|
||||||
$params = ' ';
|
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||||
} else {
|
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||||
$params = sprintf('-f%s', $this->Sender);
|
$params = sprintf('-f%s', escapeshellarg($this->Sender));
|
||||||
}
|
}
|
||||||
if ($this->Sender != '' and !ini_get('safe_mode')) {
|
if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
|
||||||
$old_from = ini_get('sendmail_from');
|
$old_from = ini_get('sendmail_from');
|
||||||
ini_set('sendmail_from', $this->Sender);
|
ini_set('sendmail_from', $this->Sender);
|
||||||
}
|
}
|
||||||
$result = false;
|
$result = false;
|
||||||
if ($this->SingleTo && count($toArr) > 1) {
|
if ($this->SingleTo and count($toArr) > 1) {
|
||||||
foreach ($toArr as $toAddr) {
|
foreach ($toArr as $toAddr) {
|
||||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||||
$this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);
|
$this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);
|
||||||
@ -1463,10 +1498,10 @@ class PHPMailer
|
|||||||
if (!$this->smtpConnect($this->SMTPOptions)) {
|
if (!$this->smtpConnect($this->SMTPOptions)) {
|
||||||
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||||
}
|
}
|
||||||
if ('' == $this->Sender) {
|
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||||
$smtp_from = $this->From;
|
|
||||||
} else {
|
|
||||||
$smtp_from = $this->Sender;
|
$smtp_from = $this->Sender;
|
||||||
|
} else {
|
||||||
|
$smtp_from = $this->From;
|
||||||
}
|
}
|
||||||
if (!$this->smtp->mail($smtp_from)) {
|
if (!$this->smtp->mail($smtp_from)) {
|
||||||
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
||||||
@ -1520,12 +1555,17 @@ class PHPMailer
|
|||||||
* @throws phpmailerException
|
* @throws phpmailerException
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function smtpConnect($options = array())
|
public function smtpConnect($options = null)
|
||||||
{
|
{
|
||||||
if (is_null($this->smtp)) {
|
if (is_null($this->smtp)) {
|
||||||
$this->smtp = $this->getSMTPInstance();
|
$this->smtp = $this->getSMTPInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If no options are provided, use whatever is set in the instance
|
||||||
|
if (is_null($options)) {
|
||||||
|
$options = $this->SMTPOptions;
|
||||||
|
}
|
||||||
|
|
||||||
// Already connected?
|
// Already connected?
|
||||||
if ($this->smtp->connected()) {
|
if ($this->smtp->connected()) {
|
||||||
return true;
|
return true;
|
||||||
@ -1595,7 +1635,7 @@ class PHPMailer
|
|||||||
if (!$this->smtp->startTLS()) {
|
if (!$this->smtp->startTLS()) {
|
||||||
throw new phpmailerException($this->lang('connect_host'));
|
throw new phpmailerException($this->lang('connect_host'));
|
||||||
}
|
}
|
||||||
// We must resend HELO after tls negotiation
|
// We must resend EHLO after TLS negotiation
|
||||||
$this->smtp->hello($hello);
|
$this->smtp->hello($hello);
|
||||||
}
|
}
|
||||||
if ($this->SMTPAuth) {
|
if ($this->SMTPAuth) {
|
||||||
@ -1634,7 +1674,7 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function smtpClose()
|
public function smtpClose()
|
||||||
{
|
{
|
||||||
if ($this->smtp !== null) {
|
if (is_a($this->smtp, 'SMTP')) {
|
||||||
if ($this->smtp->connected()) {
|
if ($this->smtp->connected()) {
|
||||||
$this->smtp->quit();
|
$this->smtp->quit();
|
||||||
$this->smtp->close();
|
$this->smtp->close();
|
||||||
@ -1653,6 +1693,19 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function setLanguage($langcode = 'en', $lang_path = '')
|
public function setLanguage($langcode = 'en', $lang_path = '')
|
||||||
{
|
{
|
||||||
|
// Backwards compatibility for renamed language codes
|
||||||
|
$renamed_langcodes = array(
|
||||||
|
'br' => 'pt_br',
|
||||||
|
'cz' => 'cs',
|
||||||
|
'dk' => 'da',
|
||||||
|
'no' => 'nb',
|
||||||
|
'se' => 'sv',
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isset($renamed_langcodes[$langcode])) {
|
||||||
|
$langcode = $renamed_langcodes[$langcode];
|
||||||
|
}
|
||||||
|
|
||||||
// Define full set of translatable strings in English
|
// Define full set of translatable strings in English
|
||||||
$PHPMAILER_LANG = array(
|
$PHPMAILER_LANG = array(
|
||||||
'authenticate' => 'SMTP Error: Could not authenticate.',
|
'authenticate' => 'SMTP Error: Could not authenticate.',
|
||||||
@ -1679,6 +1732,10 @@ class PHPMailer
|
|||||||
// Calculate an absolute path so it can work if CWD is not here
|
// Calculate an absolute path so it can work if CWD is not here
|
||||||
$lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
|
$lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
//Validate $langcode
|
||||||
|
if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
|
||||||
|
$langcode = 'en';
|
||||||
|
}
|
||||||
$foundlang = true;
|
$foundlang = true;
|
||||||
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
|
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
|
||||||
// There is no English translation file
|
// There is no English translation file
|
||||||
@ -1972,7 +2029,9 @@ class PHPMailer
|
|||||||
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
|
$result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->MessageID != '') {
|
// Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
|
||||||
|
// https://tools.ietf.org/html/rfc5322#section-3.6.4
|
||||||
|
if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) {
|
||||||
$this->lastMessageID = $this->MessageID;
|
$this->lastMessageID = $this->MessageID;
|
||||||
} else {
|
} else {
|
||||||
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
||||||
@ -2074,7 +2133,15 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function getSentMIMEMessage()
|
public function getSentMIMEMessage()
|
||||||
{
|
{
|
||||||
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
|
return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create unique ID
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function generateId() {
|
||||||
|
return md5(uniqid(time()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2088,7 +2155,7 @@ class PHPMailer
|
|||||||
{
|
{
|
||||||
$body = '';
|
$body = '';
|
||||||
//Create unique IDs and preset boundaries
|
//Create unique IDs and preset boundaries
|
||||||
$this->uniqueid = md5(uniqid(time()));
|
$this->uniqueid = $this->generateId();
|
||||||
$this->boundary[1] = 'b1_' . $this->uniqueid;
|
$this->boundary[1] = 'b1_' . $this->uniqueid;
|
||||||
$this->boundary[2] = 'b2_' . $this->uniqueid;
|
$this->boundary[2] = 'b2_' . $this->uniqueid;
|
||||||
$this->boundary[3] = 'b3_' . $this->uniqueid;
|
$this->boundary[3] = 'b3_' . $this->uniqueid;
|
||||||
@ -2104,12 +2171,12 @@ class PHPMailer
|
|||||||
//Can we do a 7-bit downgrade?
|
//Can we do a 7-bit downgrade?
|
||||||
if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
|
if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
|
||||||
$bodyEncoding = '7bit';
|
$bodyEncoding = '7bit';
|
||||||
|
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
|
||||||
$bodyCharSet = 'us-ascii';
|
$bodyCharSet = 'us-ascii';
|
||||||
}
|
}
|
||||||
//If lines are too long, and we're not already using an encoding that will shorten them,
|
//If lines are too long, and we're not already using an encoding that will shorten them,
|
||||||
//change to quoted-printable transfer encoding
|
//change to quoted-printable transfer encoding for the body part only
|
||||||
if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
|
if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
|
||||||
$this->Encoding = 'quoted-printable';
|
|
||||||
$bodyEncoding = 'quoted-printable';
|
$bodyEncoding = 'quoted-printable';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2118,10 +2185,12 @@ class PHPMailer
|
|||||||
//Can we do a 7-bit downgrade?
|
//Can we do a 7-bit downgrade?
|
||||||
if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
|
if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
|
||||||
$altBodyEncoding = '7bit';
|
$altBodyEncoding = '7bit';
|
||||||
|
//All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
|
||||||
$altBodyCharSet = 'us-ascii';
|
$altBodyCharSet = 'us-ascii';
|
||||||
}
|
}
|
||||||
//If lines are too long, change to quoted-printable transfer encoding
|
//If lines are too long, and we're not already using an encoding that will shorten them,
|
||||||
if (self::hasLineLongerThanMax($this->AltBody)) {
|
//change to quoted-printable transfer encoding for the alt body part only
|
||||||
|
if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) {
|
||||||
$altBodyEncoding = 'quoted-printable';
|
$altBodyEncoding = 'quoted-printable';
|
||||||
}
|
}
|
||||||
//Use this as a preamble in all multipart message types
|
//Use this as a preamble in all multipart message types
|
||||||
@ -2224,8 +2293,10 @@ class PHPMailer
|
|||||||
$body .= $this->attachAll('attachment', $this->boundary[1]);
|
$body .= $this->attachAll('attachment', $this->boundary[1]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// catch case 'plain' and case ''
|
// Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types
|
||||||
$body .= $this->encodeString($this->Body, $bodyEncoding);
|
//Reset the `Encoding` property in case we changed it for line length reasons
|
||||||
|
$this->Encoding = $bodyEncoding;
|
||||||
|
$body .= $this->encodeString($this->Body, $this->Encoding);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2331,8 +2402,7 @@ class PHPMailer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the message type.
|
* Set the message type.
|
||||||
* PHPMailer only supports some preset message types,
|
* PHPMailer only supports some preset message types, not arbitrary MIME structures.
|
||||||
* not arbitrary MIME structures.
|
|
||||||
* @access protected
|
* @access protected
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -2350,6 +2420,7 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
$this->message_type = implode('_', $type);
|
$this->message_type = implode('_', $type);
|
||||||
if ($this->message_type == '') {
|
if ($this->message_type == '') {
|
||||||
|
//The 'plain' message_type refers to the message having a single body element, not that it is plain-text
|
||||||
$this->message_type = 'plain';
|
$this->message_type = 'plain';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3264,16 +3335,18 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a message from an HTML string.
|
* Create a message body from an HTML string.
|
||||||
* Automatically makes modifications for inline images and backgrounds
|
* Automatically inlines images and creates a plain-text version by converting the HTML,
|
||||||
* and creates a plain-text version by converting the HTML.
|
* overwriting any existing values in Body and AltBody.
|
||||||
* Overwrites any existing values in $this->Body and $this->AltBody
|
* $basedir is used when handling relative image paths, e.g. <img src="images/a.png">
|
||||||
|
* will look for an image file in $basedir/images/a.png and convert it to inline.
|
||||||
|
* If you don't want to apply these transformations to your HTML, just set Body and AltBody yourself.
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $message HTML message string
|
* @param string $message HTML message string
|
||||||
* @param string $basedir baseline directory for path
|
* @param string $basedir base directory for relative paths to images
|
||||||
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
|
* @param boolean|callable $advanced Whether to use the internal HTML to text converter
|
||||||
* or your own custom converter @see PHPMailer::html2text()
|
* or your own custom converter @see PHPMailer::html2text()
|
||||||
* @return string $message
|
* @return string $message The transformed message Body
|
||||||
*/
|
*/
|
||||||
public function msgHTML($message, $basedir = '', $advanced = false)
|
public function msgHTML($message, $basedir = '', $advanced = false)
|
||||||
{
|
{
|
||||||
@ -3296,7 +3369,7 @@ class PHPMailer
|
|||||||
$message
|
$message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) {
|
} elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[a-z][a-z0-9+.-]*://#i', $url)) {
|
||||||
// Do not change urls for absolute images (thanks to corvuscorax)
|
// Do not change urls for absolute images (thanks to corvuscorax)
|
||||||
// Do not change urls that are already inline images
|
// Do not change urls that are already inline images
|
||||||
$filename = basename($url);
|
$filename = basename($url);
|
||||||
@ -3332,7 +3405,7 @@ class PHPMailer
|
|||||||
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
|
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
|
||||||
$this->Body = $this->normalizeBreaks($message);
|
$this->Body = $this->normalizeBreaks($message);
|
||||||
$this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
|
$this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
|
||||||
if (empty($this->AltBody)) {
|
if (!$this->alternativeExists()) {
|
||||||
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
|
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
|
||||||
self::CRLF . self::CRLF;
|
self::CRLF . self::CRLF;
|
||||||
}
|
}
|
||||||
@ -3343,7 +3416,7 @@ class PHPMailer
|
|||||||
* Convert an HTML string into plain text.
|
* Convert an HTML string into plain text.
|
||||||
* This is used by msgHTML().
|
* This is used by msgHTML().
|
||||||
* Note - older versions of this function used a bundled advanced converter
|
* Note - older versions of this function used a bundled advanced converter
|
||||||
* which was been removed for license reasons in #232
|
* which was been removed for license reasons in #232.
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* <code>
|
* <code>
|
||||||
* // Use default conversion
|
* // Use default conversion
|
||||||
@ -3643,7 +3716,7 @@ class PHPMailer
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $signHeader
|
* @param string $signHeader
|
||||||
* @throws phpmailerException
|
* @throws phpmailerException
|
||||||
* @return string
|
* @return string The DKIM signature value
|
||||||
*/
|
*/
|
||||||
public function DKIM_Sign($signHeader)
|
public function DKIM_Sign($signHeader)
|
||||||
{
|
{
|
||||||
@ -3653,15 +3726,35 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$privKeyStr = file_get_contents($this->DKIM_private);
|
$privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
|
||||||
if ($this->DKIM_passphrase != '') {
|
if ('' != $this->DKIM_passphrase) {
|
||||||
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
|
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
|
||||||
} else {
|
} else {
|
||||||
$privKey = $privKeyStr;
|
$privKey = openssl_pkey_get_private($privKeyStr);
|
||||||
}
|
}
|
||||||
if (openssl_sign($signHeader, $signature, $privKey)) {
|
//Workaround for missing digest algorithms in old PHP & OpenSSL versions
|
||||||
return base64_encode($signature);
|
//@link http://stackoverflow.com/a/11117338/333340
|
||||||
|
if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
|
||||||
|
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
|
||||||
|
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
||||||
|
openssl_pkey_free($privKey);
|
||||||
|
return base64_encode($signature);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$pinfo = openssl_pkey_get_details($privKey);
|
||||||
|
$hash = hash('sha256', $signHeader);
|
||||||
|
//'Magic' constant for SHA256 from RFC3447
|
||||||
|
//@link https://tools.ietf.org/html/rfc3447#page-43
|
||||||
|
$t = '3031300d060960864801650304020105000420' . $hash;
|
||||||
|
$pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3);
|
||||||
|
$eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
|
||||||
|
|
||||||
|
if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
|
||||||
|
openssl_pkey_free($privKey);
|
||||||
|
return base64_encode($signature);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
openssl_pkey_free($privKey);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3678,7 +3771,7 @@ class PHPMailer
|
|||||||
foreach ($lines as $key => $line) {
|
foreach ($lines as $key => $line) {
|
||||||
list($heading, $value) = explode(':', $line, 2);
|
list($heading, $value) = explode(':', $line, 2);
|
||||||
$heading = strtolower($heading);
|
$heading = strtolower($heading);
|
||||||
$value = preg_replace('/\s+/', ' ', $value); // Compress useless spaces
|
$value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces
|
||||||
$lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
|
$lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value
|
||||||
}
|
}
|
||||||
$signHeader = implode("\r\n", $lines);
|
$signHeader = implode("\r\n", $lines);
|
||||||
@ -3716,7 +3809,7 @@ class PHPMailer
|
|||||||
*/
|
*/
|
||||||
public function DKIM_Add($headers_line, $subject, $body)
|
public function DKIM_Add($headers_line, $subject, $body)
|
||||||
{
|
{
|
||||||
$DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms
|
$DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
|
||||||
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
|
$DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body
|
||||||
$DKIMquery = 'dns/txt'; // Query method
|
$DKIMquery = 'dns/txt'; // Query method
|
||||||
$DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
|
$DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone)
|
||||||
@ -3724,6 +3817,7 @@ class PHPMailer
|
|||||||
$headers = explode($this->LE, $headers_line);
|
$headers = explode($this->LE, $headers_line);
|
||||||
$from_header = '';
|
$from_header = '';
|
||||||
$to_header = '';
|
$to_header = '';
|
||||||
|
$date_header = '';
|
||||||
$current = '';
|
$current = '';
|
||||||
foreach ($headers as $header) {
|
foreach ($headers as $header) {
|
||||||
if (strpos($header, 'From:') === 0) {
|
if (strpos($header, 'From:') === 0) {
|
||||||
@ -3732,6 +3826,9 @@ class PHPMailer
|
|||||||
} elseif (strpos($header, 'To:') === 0) {
|
} elseif (strpos($header, 'To:') === 0) {
|
||||||
$to_header = $header;
|
$to_header = $header;
|
||||||
$current = 'to_header';
|
$current = 'to_header';
|
||||||
|
} elseif (strpos($header, 'Date:') === 0) {
|
||||||
|
$date_header = $header;
|
||||||
|
$current = 'date_header';
|
||||||
} else {
|
} else {
|
||||||
if (!empty($$current) && strpos($header, ' =?') === 0) {
|
if (!empty($$current) && strpos($header, ' =?') === 0) {
|
||||||
$$current .= $header;
|
$$current .= $header;
|
||||||
@ -3742,6 +3839,7 @@ class PHPMailer
|
|||||||
}
|
}
|
||||||
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
|
$from = str_replace('|', '=7C', $this->DKIM_QP($from_header));
|
||||||
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
|
$to = str_replace('|', '=7C', $this->DKIM_QP($to_header));
|
||||||
|
$date = str_replace('|', '=7C', $this->DKIM_QP($date_header));
|
||||||
$subject = str_replace(
|
$subject = str_replace(
|
||||||
'|',
|
'|',
|
||||||
'=7C',
|
'=7C',
|
||||||
@ -3749,7 +3847,7 @@ class PHPMailer
|
|||||||
); // Copied header fields (dkim-quoted-printable)
|
); // Copied header fields (dkim-quoted-printable)
|
||||||
$body = $this->DKIM_BodyC($body);
|
$body = $this->DKIM_BodyC($body);
|
||||||
$DKIMlen = strlen($body); // Length of body
|
$DKIMlen = strlen($body); // Length of body
|
||||||
$DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body
|
$DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
|
||||||
if ('' == $this->DKIM_identity) {
|
if ('' == $this->DKIM_identity) {
|
||||||
$ident = '';
|
$ident = '';
|
||||||
} else {
|
} else {
|
||||||
@ -3762,16 +3860,18 @@ class PHPMailer
|
|||||||
$this->DKIM_selector .
|
$this->DKIM_selector .
|
||||||
";\r\n" .
|
";\r\n" .
|
||||||
"\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
|
"\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" .
|
||||||
"\th=From:To:Subject;\r\n" .
|
"\th=From:To:Date:Subject;\r\n" .
|
||||||
"\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
|
"\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" .
|
||||||
"\tz=$from\r\n" .
|
"\tz=$from\r\n" .
|
||||||
"\t|$to\r\n" .
|
"\t|$to\r\n" .
|
||||||
|
"\t|$date\r\n" .
|
||||||
"\t|$subject;\r\n" .
|
"\t|$subject;\r\n" .
|
||||||
"\tbh=" . $DKIMb64 . ";\r\n" .
|
"\tbh=" . $DKIMb64 . ";\r\n" .
|
||||||
"\tb=";
|
"\tb=";
|
||||||
$toSign = $this->DKIM_HeaderC(
|
$toSign = $this->DKIM_HeaderC(
|
||||||
$from_header . "\r\n" .
|
$from_header . "\r\n" .
|
||||||
$to_header . "\r\n" .
|
$to_header . "\r\n" .
|
||||||
|
$date_header . "\r\n" .
|
||||||
$subject_header . "\r\n" .
|
$subject_header . "\r\n" .
|
||||||
$dkimhdrs
|
$dkimhdrs
|
||||||
);
|
);
|
||||||
|
|||||||
@ -80,6 +80,7 @@ class PHPMailerOAuth extends PHPMailer
|
|||||||
* @uses SMTP
|
* @uses SMTP
|
||||||
* @access public
|
* @access public
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws phpmailerException
|
||||||
*/
|
*/
|
||||||
public function smtpConnect($options = array())
|
public function smtpConnect($options = array())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -49,7 +49,8 @@ class PHPMailerOAuthGoogle
|
|||||||
$this->oauthUserEmail = $UserEmail;
|
$this->oauthUserEmail = $UserEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getProvider() {
|
private function getProvider()
|
||||||
|
{
|
||||||
return new League\OAuth2\Client\Provider\Google([
|
return new League\OAuth2\Client\Provider\Google([
|
||||||
'clientId' => $this->oauthClientId,
|
'clientId' => $this->oauthClientId,
|
||||||
'clientSecret' => $this->oauthClientSecret
|
'clientSecret' => $this->oauthClientSecret
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class POP3
|
|||||||
* @var string
|
* @var string
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.14';
|
public $Version = '5.2.19';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default POP3 port number.
|
* Default POP3 port number.
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class SMTP
|
|||||||
* The PHPMailer SMTP version number.
|
* The PHPMailer SMTP version number.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '5.2.14';
|
const VERSION = '5.2.19';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP line break constant.
|
* SMTP line break constant.
|
||||||
@ -81,7 +81,7 @@ class SMTP
|
|||||||
* @deprecated Use the `VERSION` constant instead
|
* @deprecated Use the `VERSION` constant instead
|
||||||
* @see SMTP::VERSION
|
* @see SMTP::VERSION
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.14';
|
public $Version = '5.2.19';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP server port number.
|
* SMTP server port number.
|
||||||
@ -150,6 +150,17 @@ class SMTP
|
|||||||
*/
|
*/
|
||||||
public $Timelimit = 300;
|
public $Timelimit = 300;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array patterns to extract smtp transaction id from smtp reply
|
||||||
|
* Only first capture group will be use, use non-capturing group to deal with it
|
||||||
|
* Extend this class to override this property to fulfil your needs.
|
||||||
|
*/
|
||||||
|
protected $smtp_transaction_id_patterns = array(
|
||||||
|
'exim' => '/[0-9]{3} OK id=(.*)/',
|
||||||
|
'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
|
||||||
|
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The socket for the server connection.
|
* The socket for the server connection.
|
||||||
* @var resource
|
* @var resource
|
||||||
@ -206,7 +217,7 @@ class SMTP
|
|||||||
}
|
}
|
||||||
//Avoid clash with built-in function names
|
//Avoid clash with built-in function names
|
||||||
if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
|
if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
|
||||||
call_user_func($this->Debugoutput, $str, $this->do_debug);
|
call_user_func($this->Debugoutput, $str, $level);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch ($this->Debugoutput) {
|
switch ($this->Debugoutput) {
|
||||||
@ -272,8 +283,8 @@ class SMTP
|
|||||||
$errstr = '';
|
$errstr = '';
|
||||||
if ($streamok) {
|
if ($streamok) {
|
||||||
$socket_context = stream_context_create($options);
|
$socket_context = stream_context_create($options);
|
||||||
//Suppress errors; connection failures are handled at a higher level
|
set_error_handler(array($this, 'errorHandler'));
|
||||||
$this->smtp_conn = @stream_socket_client(
|
$this->smtp_conn = stream_socket_client(
|
||||||
$host . ":" . $port,
|
$host . ":" . $port,
|
||||||
$errno,
|
$errno,
|
||||||
$errstr,
|
$errstr,
|
||||||
@ -281,12 +292,14 @@ class SMTP
|
|||||||
STREAM_CLIENT_CONNECT,
|
STREAM_CLIENT_CONNECT,
|
||||||
$socket_context
|
$socket_context
|
||||||
);
|
);
|
||||||
|
restore_error_handler();
|
||||||
} else {
|
} else {
|
||||||
//Fall back to fsockopen which should work in more places, but is missing some features
|
//Fall back to fsockopen which should work in more places, but is missing some features
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
"Connection: stream_socket_client not available, falling back to fsockopen",
|
"Connection: stream_socket_client not available, falling back to fsockopen",
|
||||||
self::DEBUG_CONNECTION
|
self::DEBUG_CONNECTION
|
||||||
);
|
);
|
||||||
|
set_error_handler(array($this, 'errorHandler'));
|
||||||
$this->smtp_conn = fsockopen(
|
$this->smtp_conn = fsockopen(
|
||||||
$host,
|
$host,
|
||||||
$port,
|
$port,
|
||||||
@ -294,6 +307,7 @@ class SMTP
|
|||||||
$errstr,
|
$errstr,
|
||||||
$timeout
|
$timeout
|
||||||
);
|
);
|
||||||
|
restore_error_handler();
|
||||||
}
|
}
|
||||||
// Verify we connected properly
|
// Verify we connected properly
|
||||||
if (!is_resource($this->smtp_conn)) {
|
if (!is_resource($this->smtp_conn)) {
|
||||||
@ -336,11 +350,22 @@ class SMTP
|
|||||||
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
|
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Allow the best TLS version(s) we can
|
||||||
|
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;
|
||||||
|
|
||||||
|
//PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT
|
||||||
|
//so add them back in manually if we can
|
||||||
|
if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
|
||||||
|
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
|
||||||
|
$crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
|
||||||
|
}
|
||||||
|
|
||||||
// Begin encrypted connection
|
// Begin encrypted connection
|
||||||
if (!stream_socket_enable_crypto(
|
if (!stream_socket_enable_crypto(
|
||||||
$this->smtp_conn,
|
$this->smtp_conn,
|
||||||
true,
|
true,
|
||||||
STREAM_CRYPTO_METHOD_TLS_CLIENT
|
$crypto_method
|
||||||
)) {
|
)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -389,7 +414,7 @@ class SMTP
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (empty($authtype)) {
|
if (empty($authtype)) {
|
||||||
foreach (array('LOGIN', 'CRAM-MD5', 'NTLM', 'PLAIN', 'XOAUTH2') as $method) {
|
foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) {
|
||||||
if (in_array($method, $this->server_caps['AUTH'])) {
|
if (in_array($method, $this->server_caps['AUTH'])) {
|
||||||
$authtype = $method;
|
$authtype = $method;
|
||||||
break;
|
break;
|
||||||
@ -463,7 +488,7 @@ class SMTP
|
|||||||
$temp = new stdClass;
|
$temp = new stdClass;
|
||||||
$ntlm_client = new ntlm_sasl_client_class;
|
$ntlm_client = new ntlm_sasl_client_class;
|
||||||
//Check that functions are available
|
//Check that functions are available
|
||||||
if (!$ntlm_client->Initialize($temp)) {
|
if (!$ntlm_client->initialize($temp)) {
|
||||||
$this->setError($temp->error);
|
$this->setError($temp->error);
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
'You need to enable some modules in your php.ini file: '
|
'You need to enable some modules in your php.ini file: '
|
||||||
@ -473,7 +498,7 @@ class SMTP
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//msg1
|
//msg1
|
||||||
$msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1
|
$msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1
|
||||||
|
|
||||||
if (!$this->sendCommand(
|
if (!$this->sendCommand(
|
||||||
'AUTH NTLM',
|
'AUTH NTLM',
|
||||||
@ -492,7 +517,7 @@ class SMTP
|
|||||||
$password
|
$password
|
||||||
);
|
);
|
||||||
//msg3
|
//msg3
|
||||||
$msg3 = $ntlm_client->TypeMsg3(
|
$msg3 = $ntlm_client->typeMsg3(
|
||||||
$ntlm_res,
|
$ntlm_res,
|
||||||
$username,
|
$username,
|
||||||
$realm,
|
$realm,
|
||||||
@ -736,7 +761,7 @@ class SMTP
|
|||||||
protected function parseHelloFields($type)
|
protected function parseHelloFields($type)
|
||||||
{
|
{
|
||||||
$this->server_caps = array();
|
$this->server_caps = array();
|
||||||
$lines = explode("\n", $this->last_reply);
|
$lines = explode("\n", $this->helo_rply);
|
||||||
|
|
||||||
foreach ($lines as $n => $s) {
|
foreach ($lines as $n => $s) {
|
||||||
//First 4 chars contain response code followed by - or space
|
//First 4 chars contain response code followed by - or space
|
||||||
@ -1178,4 +1203,47 @@ class SMTP
|
|||||||
{
|
{
|
||||||
return $this->Timeout;
|
return $this->Timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reports an error number and string.
|
||||||
|
* @param integer $errno The error number returned by PHP.
|
||||||
|
* @param string $errmsg The error message returned by PHP.
|
||||||
|
*/
|
||||||
|
protected function errorHandler($errno, $errmsg)
|
||||||
|
{
|
||||||
|
$notice = 'Connection: Failed to connect to server.';
|
||||||
|
$this->setError(
|
||||||
|
$notice,
|
||||||
|
$errno,
|
||||||
|
$errmsg
|
||||||
|
);
|
||||||
|
$this->edebug(
|
||||||
|
$notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
|
||||||
|
self::DEBUG_CONNECTION
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will return the ID of the last smtp transaction based on a list of patterns provided
|
||||||
|
* in SMTP::$smtp_transaction_id_patterns.
|
||||||
|
* If no reply has been received yet, it will return null.
|
||||||
|
* If no pattern has been matched, it will return false.
|
||||||
|
* @return bool|null|string
|
||||||
|
*/
|
||||||
|
public function getLastTransactionID()
|
||||||
|
{
|
||||||
|
$reply = $this->getLastReply();
|
||||||
|
|
||||||
|
if (empty($reply)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
|
||||||
|
if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
|
||||||
|
return $matches[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
44
plugin/PHPMailer/composer.json
Normal file
44
plugin/PHPMailer/composer.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"name": "phpmailer/phpmailer",
|
||||||
|
"type": "library",
|
||||||
|
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Marcus Bointon",
|
||||||
|
"email": "phpmailer@synchromedia.co.uk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jim Jagielski",
|
||||||
|
"email": "jimjag@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Andy Prevost",
|
||||||
|
"email": "codeworxtech@users.sourceforge.net"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Brent R. Matzelle"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpdocumentor/phpdocumentor": "*",
|
||||||
|
"phpunit/phpunit": "4.7.*"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"class.phpmailer.php",
|
||||||
|
"class.phpmaileroauth.php",
|
||||||
|
"class.phpmaileroauthgoogle.php",
|
||||||
|
"class.smtp.php",
|
||||||
|
"class.pop3.php",
|
||||||
|
"extras/EasyPeasyICS.php",
|
||||||
|
"extras/ntlm_sasl_client.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"license": "LGPL-2.1"
|
||||||
|
}
|
||||||
3576
plugin/PHPMailer/composer.lock
generated
Normal file
3576
plugin/PHPMailer/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
38
plugin/PHPMailer/examples/DKIM.phps
Normal file
38
plugin/PHPMailer/examples/DKIM.phps
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This example shows how to use DKIM message authentication with PHPMailer.
|
||||||
|
* There's more to using DKIM than just this code - check out this article:
|
||||||
|
* @link https://yomotherboard.com/how-to-setup-email-server-dkim-keys/
|
||||||
|
* See also the DKIM code in the PHPMailer unit tests,
|
||||||
|
* which shows how to make a key pair from PHP.
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../PHPMailerAutoload.php';
|
||||||
|
|
||||||
|
//Create a new PHPMailer instance
|
||||||
|
$mail = new PHPMailer;
|
||||||
|
//Set who the message is to be sent from
|
||||||
|
$mail->setFrom('from@example.com', 'First Last');
|
||||||
|
//Set an alternative reply-to address
|
||||||
|
$mail->addReplyTo('replyto@example.com', 'First Last');
|
||||||
|
//Set who the message is to be sent to
|
||||||
|
$mail->addAddress('whoto@example.com', 'John Doe');
|
||||||
|
//Set the subject line
|
||||||
|
$mail->Subject = 'PHPMailer DKIM test';
|
||||||
|
//This should be the same as the domain of your From address
|
||||||
|
$mail->DKIM_domain = 'example.com';
|
||||||
|
//Path to your private key file
|
||||||
|
$mail->DKIM_private = 'dkim_private.pem';
|
||||||
|
//Set this to your own selector
|
||||||
|
$mail->DKIM_selector = 'phpmailer';
|
||||||
|
//If your private key has a passphrase, set it here
|
||||||
|
$mail->DKIM_passphrase = '';
|
||||||
|
//The identity you're signing as - usually your From address
|
||||||
|
$mail->DKIM_identity = $mail->From;
|
||||||
|
|
||||||
|
//send the message, check for errors
|
||||||
|
if (!$mail->send()) {
|
||||||
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
echo "Message sent!";
|
||||||
|
}
|
||||||
11
plugin/PHPMailer/examples/scripts/shLegacy.js
vendored
11
plugin/PHPMailer/examples/scripts/shLegacy.js
vendored
@ -23,24 +23,23 @@ dp.SyntaxHighlighter = {
|
|||||||
return match.value;
|
return match.value;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
}
|
||||||
|
|
||||||
function defaultValue(value, def)
|
function defaultValue(value, def)
|
||||||
{
|
{
|
||||||
return value != null ? value : def;
|
return value != null ? value : def;
|
||||||
};
|
}
|
||||||
|
|
||||||
function asString(value)
|
function asString(value)
|
||||||
{
|
{
|
||||||
return value != null ? value.toString() : null;
|
return value != null ? value.toString() : null;
|
||||||
};
|
}
|
||||||
|
|
||||||
var parts = input.split(':'),
|
var parts = input.split(':'),
|
||||||
brushName = parts[0],
|
brushName = parts[0],
|
||||||
options = {},
|
options = {},
|
||||||
straight = { 'true' : true }
|
straight = { 'true' : true },
|
||||||
reverse = { 'true' : false },
|
reverse = { 'true' : false },
|
||||||
result = null,
|
|
||||||
defaults = SyntaxHighlighter.defaults
|
defaults = SyntaxHighlighter.defaults
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -89,7 +88,7 @@ dp.SyntaxHighlighter = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
};
|
}
|
||||||
|
|
||||||
function findTagsByName(list, name, tagName)
|
function findTagsByName(list, name, tagName)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,7 +12,7 @@ if (array_key_exists('userfile', $_FILES)) {
|
|||||||
// Upload handled successfully
|
// Upload handled successfully
|
||||||
// Now create a message
|
// Now create a message
|
||||||
// This should be somewhere in your include_path
|
// This should be somewhere in your include_path
|
||||||
require 'PHPMailerAutoload.php';
|
require '../PHPMailerAutoload.php';
|
||||||
$mail = new PHPMailer;
|
$mail = new PHPMailer;
|
||||||
$mail->setFrom('from@example.com', 'First Last');
|
$mail->setFrom('from@example.com', 'First Last');
|
||||||
$mail->addAddress('whoto@example.com', 'John Doe');
|
$mail->addAddress('whoto@example.com', 'John Doe');
|
||||||
@ -21,19 +21,19 @@ if (array_key_exists('userfile', $_FILES)) {
|
|||||||
// Attach the uploaded file
|
// Attach the uploaded file
|
||||||
$mail->addAttachment($uploadfile, 'My uploaded file');
|
$mail->addAttachment($uploadfile, 'My uploaded file');
|
||||||
if (!$mail->send()) {
|
if (!$mail->send()) {
|
||||||
$msg = "Mailer Error: " . $mail->ErrorInfo;
|
$msg .= "Mailer Error: " . $mail->ErrorInfo;
|
||||||
} else {
|
} else {
|
||||||
$msg = "Message sent!";
|
$msg .= "Message sent!";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$msg = 'Failed to move file to ' . $uploadfile;
|
$msg .= 'Failed to move file to ' . $uploadfile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>PHPMailer Upload</title>
|
<title>PHPMailer Upload</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
51
plugin/PHPMailer/examples/send_multiple_file_upload.phps
Normal file
51
plugin/PHPMailer/examples/send_multiple_file_upload.phps
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPMailer multiple files upload and send example
|
||||||
|
*/
|
||||||
|
$msg = '';
|
||||||
|
if (array_key_exists('userfile', $_FILES)) {
|
||||||
|
|
||||||
|
// Create a message
|
||||||
|
// This should be somewhere in your include_path
|
||||||
|
require '../PHPMailerAutoload.php';
|
||||||
|
$mail = new PHPMailer;
|
||||||
|
$mail->setFrom('from@example.com', 'First Last');
|
||||||
|
$mail->addAddress('whoto@example.com', 'John Doe');
|
||||||
|
$mail->Subject = 'PHPMailer file sender';
|
||||||
|
$mail->msgHTML('My message body');
|
||||||
|
//Attach multiple files one by one
|
||||||
|
for ($ct = 0; $ct < count($_FILES['userfile']['tmp_name']); $ct++) {
|
||||||
|
$uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['userfile']['name'][$ct]));
|
||||||
|
$filename = $_FILES['userfile']['name'][$ct];
|
||||||
|
if (move_uploaded_file($_FILES['userfile']['tmp_name'][$ct], $uploadfile)) {
|
||||||
|
$mail->addAttachment($uploadfile, $filename);
|
||||||
|
} else {
|
||||||
|
$msg .= 'Failed to move file to ' . $uploadfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$mail->send()) {
|
||||||
|
$msg .= "Mailer Error: " . $mail->ErrorInfo;
|
||||||
|
} else {
|
||||||
|
$msg .= "Message sent!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>PHPMailer Upload</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php if (empty($msg)) { ?>
|
||||||
|
<form method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
|
||||||
|
Select one or more files:
|
||||||
|
<input name="userfile[]" type="file" multiple="multiple">
|
||||||
|
<input type="submit" value="Send Files">
|
||||||
|
</form>
|
||||||
|
<?php } else {
|
||||||
|
echo $msg;
|
||||||
|
} ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -17,24 +17,39 @@ $smtp = new SMTP;
|
|||||||
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
|
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//Connect to an SMTP server
|
//Connect to an SMTP server
|
||||||
if ($smtp->connect('mail.example.com', 25)) {
|
if (!$smtp->connect('mail.example.com', 25)) {
|
||||||
//Say hello
|
|
||||||
if ($smtp->hello('localhost')) { //Put your host name in here
|
|
||||||
//Authenticate
|
|
||||||
if ($smtp->authenticate('username', 'password')) {
|
|
||||||
echo "Connected ok!";
|
|
||||||
} else {
|
|
||||||
throw new Exception('Authentication failed: ' . $smtp->getLastReply());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Exception('HELO failed: '. $smtp->getLastReply());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Exception('Connect failed');
|
throw new Exception('Connect failed');
|
||||||
}
|
}
|
||||||
|
//Say hello
|
||||||
|
if (!$smtp->hello(gethostname())) {
|
||||||
|
throw new Exception('EHLO failed: ' . $smtp->getError()['error']);
|
||||||
|
}
|
||||||
|
//Get the list of ESMTP services the server offers
|
||||||
|
$e = $smtp->getServerExtList();
|
||||||
|
//If server can do TLS encryption, use it
|
||||||
|
if (is_array($e) && array_key_exists('STARTTLS', $e)) {
|
||||||
|
$tlsok = $smtp->startTLS();
|
||||||
|
if (!$tlsok) {
|
||||||
|
throw new Exception('Failed to start encryption: ' . $smtp->getError()['error']);
|
||||||
|
}
|
||||||
|
//Repeat EHLO after STARTTLS
|
||||||
|
if (!$smtp->hello(gethostname())) {
|
||||||
|
throw new Exception('EHLO (2) failed: ' . $smtp->getError()['error']);
|
||||||
|
}
|
||||||
|
//Get new capabilities list, which will usually now include AUTH if it didn't before
|
||||||
|
$e = $smtp->getServerExtList();
|
||||||
|
}
|
||||||
|
//If server supports authentication, do it (even if no encryption)
|
||||||
|
if (is_array($e) && array_key_exists('AUTH', $e)) {
|
||||||
|
if ($smtp->authenticate('username', 'password')) {
|
||||||
|
echo "Connected ok!";
|
||||||
|
} else {
|
||||||
|
throw new Exception('Authentication failed: ' . $smtp->getError()['error']);
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo 'SMTP error: '. $e->getMessage(), "\n";
|
echo 'SMTP error: ' . $e->getMessage(), "\n";
|
||||||
}
|
}
|
||||||
//Whatever happened, close the connection.
|
//Whatever happened, close the connection.
|
||||||
$smtp->quit(true);
|
$smtp->quit(true);
|
||||||
|
|||||||
@ -461,7 +461,6 @@ function tln_deent(&$attvalue, $regex, $hex = false)
|
|||||||
* checks on them.
|
* checks on them.
|
||||||
*
|
*
|
||||||
* @param string $attvalue A string to run entity check against.
|
* @param string $attvalue A string to run entity check against.
|
||||||
* @return Void, modifies a reference value.
|
|
||||||
*/
|
*/
|
||||||
function tln_defang(&$attvalue)
|
function tln_defang(&$attvalue)
|
||||||
{
|
{
|
||||||
@ -488,7 +487,6 @@ function tln_defang(&$attvalue)
|
|||||||
* be funny to make "java[tab]script" be just as good as "javascript".
|
* be funny to make "java[tab]script" be just as good as "javascript".
|
||||||
*
|
*
|
||||||
* @param string $attvalue The attribute value before extraneous spaces removed.
|
* @param string $attvalue The attribute value before extraneous spaces removed.
|
||||||
* @return Void, modifies a reference value.
|
|
||||||
*/
|
*/
|
||||||
function tln_unspace(&$attvalue)
|
function tln_unspace(&$attvalue)
|
||||||
{
|
{
|
||||||
@ -511,7 +509,7 @@ function tln_unspace(&$attvalue)
|
|||||||
* @param array $add_attr_to_tag See description for tln_sanitize
|
* @param array $add_attr_to_tag See description for tln_sanitize
|
||||||
* @param string $trans_image_path
|
* @param string $trans_image_path
|
||||||
* @param boolean $block_external_images
|
* @param boolean $block_external_images
|
||||||
* @return Array with modified attributes.
|
* @return array with modified attributes.
|
||||||
*/
|
*/
|
||||||
function tln_fixatts(
|
function tln_fixatts(
|
||||||
$tagname,
|
$tagname,
|
||||||
@ -667,9 +665,7 @@ function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_ima
|
|||||||
|
|
||||||
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||||
{
|
{
|
||||||
$me = 'tln_fixstyle';
|
|
||||||
// workaround for </style> in between comments
|
// workaround for </style> in between comments
|
||||||
$iCurrentPos = $pos;
|
|
||||||
$content = '';
|
$content = '';
|
||||||
$sToken = '';
|
$sToken = '';
|
||||||
$bSucces = false;
|
$bSucces = false;
|
||||||
@ -740,8 +736,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
|||||||
*/
|
*/
|
||||||
$content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content);
|
$content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content);
|
||||||
|
|
||||||
$trans_image_path = $trans_image_path;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix url('blah') declarations.
|
* Fix url('blah') declarations.
|
||||||
*/
|
*/
|
||||||
@ -796,7 +790,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
|||||||
|
|
||||||
function tln_body2div($attary, $trans_image_path)
|
function tln_body2div($attary, $trans_image_path)
|
||||||
{
|
{
|
||||||
$me = 'tln_body2div';
|
|
||||||
$divattary = array('class' => "'bodyclass'");
|
$divattary = array('class' => "'bodyclass'");
|
||||||
$text = '#000000';
|
$text = '#000000';
|
||||||
$has_bgc_stl = $has_txt_stl = false;
|
$has_bgc_stl = $has_txt_stl = false;
|
||||||
@ -901,7 +894,7 @@ function tln_sanitize(
|
|||||||
}
|
}
|
||||||
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
|
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
|
||||||
$trusted .= $free_content;
|
$trusted .= $free_content;
|
||||||
$trusted .= tln_tagprint($tagname, false, 2);
|
$trusted .= tln_tagprint($tagname, null, 2);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -160,12 +160,12 @@ class ntlm_sasl_client_class
|
|||||||
{
|
{
|
||||||
switch ($this->state) {
|
switch ($this->state) {
|
||||||
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
|
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
|
||||||
$message = $this->TypeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
|
$message = $this->typeMsg1($this->credentials["realm"], $this->credentials["workstation"]);
|
||||||
$this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;
|
$this->state = SASL_NTLM_STATE_RESPOND_CHALLENGE;
|
||||||
break;
|
break;
|
||||||
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
||||||
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
|
$ntlm_response = $this->NTLMResponse(substr($response, 24, 8), $this->credentials["password"]);
|
||||||
$message = $this->TypeMsg3(
|
$message = $this->typeMsg3(
|
||||||
$ntlm_response,
|
$ntlm_response,
|
||||||
$this->credentials["user"],
|
$this->credentials["user"],
|
||||||
$this->credentials["realm"],
|
$this->credentials["realm"],
|
||||||
|
|||||||
@ -13,8 +13,15 @@
|
|||||||
* PHP Version 5.4
|
* PHP Version 5.4
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace League\OAuth2\Client\Provider;
|
||||||
|
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
|
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
|
||||||
|
use League\OAuth2\Client\Token\AccessToken;
|
||||||
|
use League\OAuth2\Client\Tool\BearerAuthorizationTrait;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
//If this automatic URL doesn't work, set it yourself manually
|
//If this automatic URL doesn't work, set it yourself manually
|
||||||
@ -25,14 +32,109 @@ $redirectUri = isset($_SERVER['HTTPS']) ? 'https://' : 'http://' . $_SERVER['HTT
|
|||||||
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
|
$clientId = 'RANDOMCHARS-----duv1n2.apps.googleusercontent.com';
|
||||||
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
|
$clientSecret = 'RANDOMCHARS-----lGyjPcRtvP';
|
||||||
|
|
||||||
|
class Google extends AbstractProvider
|
||||||
|
{
|
||||||
|
use BearerAuthorizationTrait;
|
||||||
|
|
||||||
|
const ACCESS_TOKEN_RESOURCE_OWNER_ID = 'id';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string If set, this will be sent to google as the "access_type" parameter.
|
||||||
|
* @link https://developers.google.com/accounts/docs/OAuth2WebServer#offline
|
||||||
|
*/
|
||||||
|
protected $accessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string If set, this will be sent to google as the "hd" parameter.
|
||||||
|
* @link https://developers.google.com/accounts/docs/OAuth2Login#hd-param
|
||||||
|
*/
|
||||||
|
protected $hostedDomain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string If set, this will be sent to google as the "scope" parameter.
|
||||||
|
* @link https://developers.google.com/gmail/api/auth/scopes
|
||||||
|
*/
|
||||||
|
protected $scope;
|
||||||
|
|
||||||
|
public function getBaseAuthorizationUrl()
|
||||||
|
{
|
||||||
|
return 'https://accounts.google.com/o/oauth2/auth';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBaseAccessTokenUrl(array $params)
|
||||||
|
{
|
||||||
|
return 'https://accounts.google.com/o/oauth2/token';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getResourceOwnerDetailsUrl(AccessToken $token)
|
||||||
|
{
|
||||||
|
return ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getAuthorizationParameters(array $options)
|
||||||
|
{
|
||||||
|
if (is_array($this->scope)) {
|
||||||
|
$separator = $this->getScopeSeparator();
|
||||||
|
$this->scope = implode($separator, $this->scope);
|
||||||
|
}
|
||||||
|
|
||||||
|
$params = array_merge(
|
||||||
|
parent::getAuthorizationParameters($options),
|
||||||
|
array_filter([
|
||||||
|
'hd' => $this->hostedDomain,
|
||||||
|
'access_type' => $this->accessType,
|
||||||
|
'scope' => $this->scope,
|
||||||
|
// if the user is logged in with more than one account ask which one to use for the login!
|
||||||
|
'authuser' => '-1'
|
||||||
|
])
|
||||||
|
);
|
||||||
|
return $params;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getDefaultScopes()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email',
|
||||||
|
'openid',
|
||||||
|
'profile',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getScopeSeparator()
|
||||||
|
{
|
||||||
|
return ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function checkResponse(ResponseInterface $response, $data)
|
||||||
|
{
|
||||||
|
if (!empty($data['error'])) {
|
||||||
|
$code = 0;
|
||||||
|
$error = $data['error'];
|
||||||
|
|
||||||
|
if (is_array($error)) {
|
||||||
|
$code = $error['code'];
|
||||||
|
$error = $error['message'];
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new IdentityProviderException($error, $code, $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function createResourceOwner(array $response, AccessToken $token)
|
||||||
|
{
|
||||||
|
return new GoogleUser($response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
|
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
|
||||||
$provider = new League\OAuth2\Client\Provider\Google(
|
$provider = new Google(
|
||||||
array(
|
array(
|
||||||
'clientId' => $clientId,
|
'clientId' => $clientId,
|
||||||
'clientSecret' => $clientSecret,
|
'clientSecret' => $clientSecret,
|
||||||
'redirectUri' => $redirectUri,
|
'redirectUri' => $redirectUri,
|
||||||
'scopes' => array('https://mail.google.com/'),
|
'scope' => array('https://mail.google.com/'),
|
||||||
'accessType' => 'offline'
|
'accessType' => 'offline'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
25
plugin/PHPMailer/language/phpmailer.lang-cs.php
Normal file
25
plugin/PHPMailer/language/phpmailer.lang-cs.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Czech PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Chyba SMTP: Autentizace selhala.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Chyba SMTP: Nelze navázat spojení se SMTP serverem.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Chyba SMTP: Data nebyla přijata.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Prázdné tělo zprávy';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Neznámé kódování: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nelze provést: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nelze získat přístup k souboru: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Chyba souboru: Nelze otevřít soubor pro čtení: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Následující adresa odesílatele je nesprávná: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Nelze vytvořit instanci emailové funkce.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Neplatná adresa: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer není podporován.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Musíte zadat alespoň jednu emailovou adresu příjemce.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Chyba SMTP: Následující adresy příjemců nejsou správně: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
|
||||||
|
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||||
26
plugin/PHPMailer/language/phpmailer.lang-da.php
Normal file
26
plugin/PHPMailer/language/phpmailer.lang-da.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Danish PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Mikael Stokkebro <info@stokkebro.dk>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
|
||||||
|
//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||||
|
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||||
|
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||||
|
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||||
|
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
|
||||||
|
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||||
@ -4,22 +4,22 @@
|
|||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
|
$PHPMAILER_LANG['connect_host'] = 'SMTP-Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-Fehler: Daten werden nicht akzeptiert.';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'E-Mail Inhalt ist leer.';
|
$PHPMAILER_LANG['empty_message'] = 'E-Mail-Inhalt ist leer.';
|
||||||
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
$PHPMAILER_LANG['encoding'] = 'Unbekannte Kodierung: ';
|
||||||
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
|
$PHPMAILER_LANG['file_open'] = 'Dateifehler: Konnte folgende Datei nicht öffnen: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
|
$PHPMAILER_LANG['instantiate'] = 'Mail-Funktion konnte nicht initialisiert werden.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Die Adresse ist ungültig: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
|
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfängeradresse an.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zum SMTP-Server fehlgeschlagen.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP-Server: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Fehlende Erweiterung: ';
|
||||||
|
|||||||
@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'Error al firmar: ';
|
|||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
|
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
|
||||||
|
|||||||
@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'ხელმოწერის შე
|
|||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
|
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: ';
|
||||||
|
|||||||
25
plugin/PHPMailer/language/phpmailer.lang-nb.php
Normal file
25
plugin/PHPMailer/language/phpmailer.lang-nb.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Norwegian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Ukjent tegnkoding: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Følgende avsenderadresse feilet: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere mailfunksjonen.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Meldingen ble ikke sendt, følgende adresse er ugyldig: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du må angi minst en mottakeradresse.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
|
||||||
|
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||||
@ -23,4 +23,4 @@ $PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
|
|||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
|
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: ';
|
||||||
|
|||||||
28
plugin/PHPMailer/language/phpmailer.lang-pt_br.php
Normal file
28
plugin/PHPMailer/language/phpmailer.lang-pt_br.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Brazilian Portuguese PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
|
||||||
|
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
||||||
|
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remententes falharam: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
|
||||||
|
$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: ';
|
||||||
@ -2,25 +2,25 @@
|
|||||||
/**
|
/**
|
||||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
* @author Catalin Constantin <catalin@dazoot.ro>
|
* @author Alex Florea <alecz.fia@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
|
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
|
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
|
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
||||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
|
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
|
||||||
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
|
$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
|
$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
|
$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
|
$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
|
$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
|
$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'A aparut o problema la semnarea emailului. ';
|
$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. ';
|
$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
|
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
|
||||||
|
|||||||
@ -18,9 +18,9 @@ $PHPMAILER_LANG['instantiate'] = 'Невозможно запустит
|
|||||||
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения';
|
$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: ';
|
$PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
|
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
|
||||||
|
|||||||
26
plugin/PHPMailer/language/phpmailer.lang-sv.php
Normal file
26
plugin/PHPMailer/language/phpmailer.lang-sv.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Swedish PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Johan Linnér <johan@linner.biz>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
|
||||||
|
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
|
||||||
|
$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';
|
||||||
Reference in New Issue
Block a user