update plugin/phpmailer
This commit is contained in:
parent
6b24f04452
commit
6cb653e4ef
21 changed files with 373 additions and 3862 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
Version 2.1, February 1999
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||||
that what they have is not the original version, so that the original
|
that what they have is not the original version, so that the original
|
||||||
author's reputation will not be affected by problems that might be
|
author's reputation will not be affected by problems that might be
|
||||||
introduced by others.
|
introduced by others.
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
Finally, software patents pose a constant threat to the existence of
|
||||||
any free program. We wish to make sure that a company cannot
|
any free program. We wish to make sure that a company cannot
|
||||||
effectively restrict the users of a free program by obtaining a
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
|
@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||||
"work based on the library" and a "work that uses the library". The
|
"work based on the library" and a "work that uses the library". The
|
||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ Library.
|
||||||
You may charge a fee for the physical act of transferring a copy,
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
and you may at your option offer warranty protection in exchange for a
|
and you may at your option offer warranty protection in exchange for a
|
||||||
fee.
|
fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
of it, thus forming a work based on the Library, and copy and
|
of it, thus forming a work based on the Library, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
|
@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
that version instead if you wish.) Do not make any other change in
|
that version instead if you wish.) Do not make any other change in
|
||||||
these notices.
|
these notices.
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
Once this change is made in a given copy, it is irreversible for
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
subsequent copies and derivative works made from that copy.
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||||
distribute the object code for the work under the terms of Section 6.
|
distribute the object code for the work under the terms of Section 6.
|
||||||
Any executables containing that work also fall under Section 6,
|
Any executables containing that work also fall under Section 6,
|
||||||
whether or not they are linked directly with the Library itself.
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
6. As an exception to the Sections above, you may also combine or
|
||||||
link a "work that uses the Library" with the Library to produce a
|
link a "work that uses the Library" with the Library to produce a
|
||||||
work containing portions of the Library, and distribute that work
|
work containing portions of the Library, and distribute that work
|
||||||
|
|
@ -312,7 +312,7 @@ of these things:
|
||||||
from a designated place, offer equivalent access to copy the above
|
from a designated place, offer equivalent access to copy the above
|
||||||
specified materials from the same place.
|
specified materials from the same place.
|
||||||
|
|
||||||
e) verify that the user has already received a copy of these
|
e) Verify that the user has already received a copy of these
|
||||||
materials or that you have already sent this user a copy.
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
For an executable, the required form of the "work that uses the
|
||||||
|
|
@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
use both them and the Library together in an executable that you
|
use both them and the Library together in an executable that you
|
||||||
distribute.
|
distribute.
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
7. You may place library facilities that are a work based on the
|
||||||
Library side-by-side in a single library together with other library
|
Library side-by-side in a single library together with other library
|
||||||
facilities not covered by this License, and distribute such a combined
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
|
@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties with
|
You are not responsible for enforcing compliance by third parties with
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
|
@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||||
the Free Software Foundation. If the Library does not specify a
|
the Free Software Foundation. If the Library does not specify a
|
||||||
license version number, you may choose any version ever published by
|
license version number, you may choose any version ever published by
|
||||||
the Free Software Foundation.
|
the Free Software Foundation.
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
programs whose distribution conditions are incompatible with these,
|
programs whose distribution conditions are incompatible with these,
|
||||||
write to the author to ask for permission. For software which is
|
write to the author to ask for permission. For software which is
|
||||||
|
|
@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
|
@ -485,7 +485,7 @@ convey the exclusion of warranty; and each file should have at least the
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public
|
You should have received a copy of the GNU Lesser General Public
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
|
@ -500,5 +500,3 @@ necessary. Here is a sample; alter the names:
|
||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
That's all there is to it!
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,20 +30,9 @@ function PHPMailerAutoload($classname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
|
||||||
//SPL autoloading was introduced in PHP 5.1.2
|
//SPL autoloading was introduced in PHP 5.1.2
|
||||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||||
} else {
|
} else {
|
||||||
spl_autoload_register('PHPMailerAutoload');
|
spl_autoload_register('PHPMailerAutoload');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
/**
|
|
||||||
* Fall back to traditional autoload for old PHP versions
|
|
||||||
* @param string $classname The name of the class to load
|
|
||||||
*/
|
|
||||||
function __autoload($classname)
|
|
||||||
{
|
|
||||||
PHPMailerAutoload($classname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
5.2.22
|
5.2.28
|
||||||
|
|
@ -31,7 +31,7 @@ class PHPMailer
|
||||||
* The PHPMailer Version number.
|
* The PHPMailer Version number.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.22';
|
public $Version = '5.2.28';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email priority.
|
* Email priority.
|
||||||
|
|
@ -440,9 +440,9 @@ class PHPMailer
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* boolean $result result of the send action
|
* boolean $result result of the send action
|
||||||
* string $to email address of the recipient
|
* array $to email addresses of the recipients
|
||||||
* string $cc cc email addresses
|
* array $cc cc email addresses
|
||||||
* string $bcc bcc email addresses
|
* array $bcc bcc email addresses
|
||||||
* string $subject the subject
|
* string $subject the subject
|
||||||
* string $body the email body
|
* string $body the email body
|
||||||
* string $from email address of sender
|
* string $from email address of sender
|
||||||
|
|
@ -659,6 +659,8 @@ class PHPMailer
|
||||||
if ($exceptions !== null) {
|
if ($exceptions !== null) {
|
||||||
$this->exceptions = (boolean)$exceptions;
|
$this->exceptions = (boolean)$exceptions;
|
||||||
}
|
}
|
||||||
|
//Pick an appropriate debug output format automatically
|
||||||
|
$this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1294,9 +1296,12 @@ 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_selector)
|
and !empty($this->DKIM_selector)
|
||||||
&& (!empty($this->DKIM_private_string)
|
and (!empty($this->DKIM_private_string)
|
||||||
|| (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
|
or (!empty($this->DKIM_private)
|
||||||
|
and self::isPermittedPath($this->DKIM_private)
|
||||||
|
and file_exists($this->DKIM_private)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$header_dkim = $this->DKIM_Add(
|
$header_dkim = $this->DKIM_Add(
|
||||||
|
|
@ -1461,6 +1466,18 @@ class PHPMailer
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether a file path is of a permitted type.
|
||||||
|
* Used to reject URLs and phar files from functions that access local file paths,
|
||||||
|
* such as addAttachment.
|
||||||
|
* @param string $path A relative or absolute path to a file.
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
protected static function isPermittedPath($path)
|
||||||
|
{
|
||||||
|
return !preg_match('#^[a-z]+://#i', $path);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send mail using the PHP mail() function.
|
* Send mail using the PHP mail() function.
|
||||||
* @param string $header The message headers
|
* @param string $header The message headers
|
||||||
|
|
@ -1622,8 +1639,13 @@ class PHPMailer
|
||||||
|
|
||||||
foreach ($hosts as $hostentry) {
|
foreach ($hosts as $hostentry) {
|
||||||
$hostinfo = array();
|
$hostinfo = array();
|
||||||
if (!preg_match('/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*):?([0-9]*)$/', trim($hostentry), $hostinfo)) {
|
if (!preg_match(
|
||||||
|
'/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/',
|
||||||
|
trim($hostentry),
|
||||||
|
$hostinfo
|
||||||
|
)) {
|
||||||
// Not a valid host entry
|
// Not a valid host entry
|
||||||
|
$this->edebug('Ignoring invalid host: ' . $hostentry);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// $hostinfo[2]: optional ssl or tls prefix
|
// $hostinfo[2]: optional ssl or tls prefix
|
||||||
|
|
@ -1742,6 +1764,7 @@ class PHPMailer
|
||||||
'dk' => 'da',
|
'dk' => 'da',
|
||||||
'no' => 'nb',
|
'no' => 'nb',
|
||||||
'se' => 'sv',
|
'se' => 'sv',
|
||||||
|
'sr' => 'rs'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($renamed_langcodes[$langcode])) {
|
if (isset($renamed_langcodes[$langcode])) {
|
||||||
|
|
@ -1783,7 +1806,7 @@ class PHPMailer
|
||||||
// There is no English translation file
|
// There is no English translation file
|
||||||
if ($langcode != 'en') {
|
if ($langcode != 'en') {
|
||||||
// Make sure language file path is readable
|
// Make sure language file path is readable
|
||||||
if (!is_readable($lang_file)) {
|
if (!self::isPermittedPath($lang_file) or !is_readable($lang_file)) {
|
||||||
$foundlang = false;
|
$foundlang = false;
|
||||||
} else {
|
} else {
|
||||||
// Overwrite language-specific strings.
|
// Overwrite language-specific strings.
|
||||||
|
|
@ -2024,10 +2047,7 @@ class PHPMailer
|
||||||
{
|
{
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
if ($this->MessageDate == '') {
|
$result .= $this->headerLine('Date', $this->MessageDate == '' ? self::rfcDate() : $this->MessageDate);
|
||||||
$this->MessageDate = self::rfcDate();
|
|
||||||
}
|
|
||||||
$result .= $this->headerLine('Date', $this->MessageDate);
|
|
||||||
|
|
||||||
// To be created automatically by mail()
|
// To be created automatically by mail()
|
||||||
if ($this->SingleTo) {
|
if ($this->SingleTo) {
|
||||||
|
|
@ -2494,6 +2514,8 @@ class PHPMailer
|
||||||
* Add an attachment from a path on the filesystem.
|
* Add an attachment from a path on the filesystem.
|
||||||
* Never use a user-supplied path to a file!
|
* Never use a user-supplied path to a file!
|
||||||
* Returns false if the file could not be found or read.
|
* Returns false if the file could not be found or read.
|
||||||
|
* Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client.
|
||||||
|
* If you need to do that, fetch the resource yourself and pass it in via a local file or string.
|
||||||
* @param string $path Path to the attachment.
|
* @param string $path Path to the attachment.
|
||||||
* @param string $name Overrides the attachment name.
|
* @param string $name Overrides the attachment name.
|
||||||
* @param string $encoding File encoding (see $Encoding).
|
* @param string $encoding File encoding (see $Encoding).
|
||||||
|
|
@ -2505,7 +2527,7 @@ class PHPMailer
|
||||||
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
|
public function addAttachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!@is_file($path)) {
|
if (!self::isPermittedPath($path) or !@is_file($path)) {
|
||||||
throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);
|
throw new phpmailerException($this->lang('file_access') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2686,10 +2708,13 @@ class PHPMailer
|
||||||
protected function encodeFile($path, $encoding = 'base64')
|
protected function encodeFile($path, $encoding = 'base64')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!is_readable($path)) {
|
if (!self::isPermittedPath($path) or !file_exists($path)) {
|
||||||
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
|
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
|
||||||
}
|
}
|
||||||
|
$magic_quotes = false;
|
||||||
|
if( version_compare(PHP_VERSION, '7.4.0', '<') ) {
|
||||||
$magic_quotes = get_magic_quotes_runtime();
|
$magic_quotes = get_magic_quotes_runtime();
|
||||||
|
}
|
||||||
if ($magic_quotes) {
|
if ($magic_quotes) {
|
||||||
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
||||||
set_magic_quotes_runtime(false);
|
set_magic_quotes_runtime(false);
|
||||||
|
|
@ -3030,7 +3055,7 @@ class PHPMailer
|
||||||
*/
|
*/
|
||||||
public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
|
public function addEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = '', $disposition = 'inline')
|
||||||
{
|
{
|
||||||
if (!@is_file($path)) {
|
if (!self::isPermittedPath($path) or !@is_file($path)) {
|
||||||
$this->setError($this->lang('file_access') . $path);
|
$this->setError($this->lang('file_access') . $path);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -3793,7 +3818,9 @@ class PHPMailer
|
||||||
if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
|
if (version_compare(PHP_VERSION, '5.3.0') >= 0 and
|
||||||
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
|
in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) {
|
||||||
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
||||||
|
if (PHP_MAJOR_VERSION < 8) {
|
||||||
openssl_pkey_free($privKey);
|
openssl_pkey_free($privKey);
|
||||||
|
}
|
||||||
return base64_encode($signature);
|
return base64_encode($signature);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3806,11 +3833,15 @@ class PHPMailer
|
||||||
$eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
|
$eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t);
|
||||||
|
|
||||||
if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
|
if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) {
|
||||||
|
if (PHP_MAJOR_VERSION < 8) {
|
||||||
openssl_pkey_free($privKey);
|
openssl_pkey_free($privKey);
|
||||||
|
}
|
||||||
return base64_encode($signature);
|
return base64_encode($signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (PHP_MAJOR_VERSION < 8) {
|
||||||
openssl_pkey_free($privKey);
|
openssl_pkey_free($privKey);
|
||||||
|
}
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4033,7 +4064,7 @@ class phpmailerException extends Exception
|
||||||
*/
|
*/
|
||||||
public function errorMessage()
|
public function errorMessage()
|
||||||
{
|
{
|
||||||
$errorMsg = '<strong>' . $this->getMessage() . "</strong><br />\n";
|
$errorMsg = '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
|
||||||
return $errorMsg;
|
return $errorMsg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class POP3
|
||||||
* @var string
|
* @var string
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public $Version = '5.2.22';
|
public $Version = '5.2.28';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.22';
|
const VERSION = '5.2.28';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.22';
|
public $Version = '5.2.28';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SMTP server port number.
|
* SMTP server port number.
|
||||||
|
|
@ -151,9 +151,8 @@ class SMTP
|
||||||
public $Timelimit = 300;
|
public $Timelimit = 300;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array patterns to extract smtp transaction id from smtp reply
|
* @var array Patterns to extract an SMTP transaction id from reply to a DATA command.
|
||||||
* Only first capture group will be use, use non-capturing group to deal with it
|
* The first capture group in each regex will be used as the ID.
|
||||||
* Extend this class to override this property to fulfil your needs.
|
|
||||||
*/
|
*/
|
||||||
protected $smtp_transaction_id_patterns = array(
|
protected $smtp_transaction_id_patterns = array(
|
||||||
'exim' => '/[0-9]{3} OK id=(.*)/',
|
'exim' => '/[0-9]{3} OK id=(.*)/',
|
||||||
|
|
@ -161,6 +160,12 @@ class SMTP
|
||||||
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
|
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string The last transaction ID issued in response to a DATA command,
|
||||||
|
* if one was detected
|
||||||
|
*/
|
||||||
|
protected $last_smtp_transaction_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The socket for the server connection.
|
* The socket for the server connection.
|
||||||
* @var resource
|
* @var resource
|
||||||
|
|
@ -227,12 +232,11 @@ class SMTP
|
||||||
break;
|
break;
|
||||||
case 'html':
|
case 'html':
|
||||||
//Cleans up output a bit for a better looking, HTML-safe output
|
//Cleans up output a bit for a better looking, HTML-safe output
|
||||||
echo htmlentities(
|
echo gmdate('Y-m-d H:i:s') . ' ' . htmlentities(
|
||||||
preg_replace('/[\r\n]+/', '', $str),
|
preg_replace('/[\r\n]+/', '', $str),
|
||||||
ENT_QUOTES,
|
ENT_QUOTES,
|
||||||
'UTF-8'
|
'UTF-8'
|
||||||
)
|
) . "<br>\n";
|
||||||
. "<br>\n";
|
|
||||||
break;
|
break;
|
||||||
case 'echo':
|
case 'echo':
|
||||||
default:
|
default:
|
||||||
|
|
@ -276,7 +280,8 @@ class SMTP
|
||||||
}
|
}
|
||||||
// Connect to the SMTP server
|
// Connect to the SMTP server
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
"Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true),
|
"Connection: opening to $host:$port, timeout=$timeout, options=" .
|
||||||
|
var_export($options, true),
|
||||||
self::DEBUG_CONNECTION
|
self::DEBUG_CONNECTION
|
||||||
);
|
);
|
||||||
$errno = 0;
|
$errno = 0;
|
||||||
|
|
@ -362,14 +367,14 @@ class SMTP
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin encrypted connection
|
// Begin encrypted connection
|
||||||
if (!stream_socket_enable_crypto(
|
set_error_handler(array($this, 'errorHandler'));
|
||||||
|
$crypto_ok = stream_socket_enable_crypto(
|
||||||
$this->smtp_conn,
|
$this->smtp_conn,
|
||||||
true,
|
true,
|
||||||
$crypto_method
|
$crypto_method
|
||||||
)) {
|
);
|
||||||
return false;
|
restore_error_handler();
|
||||||
}
|
return $crypto_ok;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -398,8 +403,7 @@ class SMTP
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('EHLO', $this->server_caps)) {
|
if (array_key_exists('EHLO', $this->server_caps)) {
|
||||||
// SMTP extensions are available. Let's try to find a proper authentication method
|
// SMTP extensions are available; try to find a proper authentication method
|
||||||
|
|
||||||
if (!array_key_exists('AUTH', $this->server_caps)) {
|
if (!array_key_exists('AUTH', $this->server_caps)) {
|
||||||
$this->setError('Authentication is not allowed at this stage');
|
$this->setError('Authentication is not allowed at this stage');
|
||||||
// 'at this stage' means that auth may be allowed after the stage changes
|
// 'at this stage' means that auth may be allowed after the stage changes
|
||||||
|
|
@ -710,6 +714,7 @@ class SMTP
|
||||||
$savetimelimit = $this->Timelimit;
|
$savetimelimit = $this->Timelimit;
|
||||||
$this->Timelimit = $this->Timelimit * 2;
|
$this->Timelimit = $this->Timelimit * 2;
|
||||||
$result = $this->sendCommand('DATA END', '.', 250);
|
$result = $this->sendCommand('DATA END', '.', 250);
|
||||||
|
$this->recordLastTransactionID();
|
||||||
//Restore timelimit
|
//Restore timelimit
|
||||||
$this->Timelimit = $savetimelimit;
|
$this->Timelimit = $savetimelimit;
|
||||||
return $result;
|
return $result;
|
||||||
|
|
@ -893,7 +898,8 @@ class SMTP
|
||||||
$code_ex = (count($matches) > 2 ? $matches[2] : null);
|
$code_ex = (count($matches) > 2 ? $matches[2] : null);
|
||||||
// Cut off error code from each response line
|
// Cut off error code from each response line
|
||||||
$detail = preg_replace(
|
$detail = preg_replace(
|
||||||
"/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m",
|
"/{$code}[ -]" .
|
||||||
|
($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . "/m",
|
||||||
'',
|
'',
|
||||||
$this->last_reply
|
$this->last_reply
|
||||||
);
|
);
|
||||||
|
|
@ -989,7 +995,10 @@ class SMTP
|
||||||
public function client_send($data)
|
public function client_send($data)
|
||||||
{
|
{
|
||||||
$this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT);
|
$this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT);
|
||||||
return fwrite($this->smtp_conn, $data);
|
set_error_handler(array($this, 'errorHandler'));
|
||||||
|
$result = fwrite($this->smtp_conn, $data);
|
||||||
|
restore_error_handler();
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1089,8 +1098,10 @@ class SMTP
|
||||||
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
|
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
|
||||||
$this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
|
$this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
|
||||||
$data .= $str;
|
$data .= $str;
|
||||||
// If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen
|
// If response is only 3 chars (not valid, but RFC5321 S4.2 says it must be handled),
|
||||||
if ((isset($str[3]) and $str[3] == ' ')) {
|
// or 4th character is a space, we are done reading, break the loop,
|
||||||
|
// string array access is a micro-optimisation over strlen
|
||||||
|
if (!isset($str[3]) or (isset($str[3]) and $str[3] == ' ')) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Timed-out? Log and break
|
// Timed-out? Log and break
|
||||||
|
|
@ -1208,42 +1219,58 @@ class SMTP
|
||||||
* Reports an error number and string.
|
* Reports an error number and string.
|
||||||
* @param integer $errno The error number returned by PHP.
|
* @param integer $errno The error number returned by PHP.
|
||||||
* @param string $errmsg The error message returned by PHP.
|
* @param string $errmsg The error message returned by PHP.
|
||||||
|
* @param string $errfile The file the error occurred in
|
||||||
|
* @param integer $errline The line number the error occurred on
|
||||||
*/
|
*/
|
||||||
protected function errorHandler($errno, $errmsg)
|
protected function errorHandler($errno, $errmsg, $errfile = '', $errline = 0)
|
||||||
{
|
{
|
||||||
$notice = 'Connection: Failed to connect to server.';
|
$notice = 'Connection failed.';
|
||||||
$this->setError(
|
$this->setError(
|
||||||
$notice,
|
$notice,
|
||||||
$errno,
|
$errno,
|
||||||
$errmsg
|
$errmsg
|
||||||
);
|
);
|
||||||
$this->edebug(
|
$this->edebug(
|
||||||
$notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg,
|
$notice . ' Error #' . $errno . ': ' . $errmsg . " [$errfile line $errline]",
|
||||||
self::DEBUG_CONNECTION
|
self::DEBUG_CONNECTION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will return the ID of the last smtp transaction based on a list of patterns provided
|
* Extract and return the ID of the last SMTP transaction based on
|
||||||
* in SMTP::$smtp_transaction_id_patterns.
|
* a list of patterns provided in SMTP::$smtp_transaction_id_patterns.
|
||||||
|
* Relies on the host providing the ID in response to a DATA command.
|
||||||
* If no reply has been received yet, it will return null.
|
* If no reply has been received yet, it will return null.
|
||||||
* If no pattern has been matched, it will return false.
|
* If no pattern was matched, it will return false.
|
||||||
* @return bool|null|string
|
* @return bool|null|string
|
||||||
*/
|
*/
|
||||||
public function getLastTransactionID()
|
protected function recordLastTransactionID()
|
||||||
{
|
{
|
||||||
$reply = $this->getLastReply();
|
$reply = $this->getLastReply();
|
||||||
|
|
||||||
if (empty($reply)) {
|
if (empty($reply)) {
|
||||||
return null;
|
$this->last_smtp_transaction_id = null;
|
||||||
}
|
} else {
|
||||||
|
$this->last_smtp_transaction_id = false;
|
||||||
foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
|
foreach ($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
|
||||||
if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
|
if (preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
|
||||||
return $matches[1];
|
$this->last_smtp_transaction_id = $matches[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return $this->last_smtp_transaction_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the queue/transaction ID of the last SMTP transaction
|
||||||
|
* If no reply has been received yet, it will return null.
|
||||||
|
* If no pattern was matched, it will return false.
|
||||||
|
* @return bool|null|string
|
||||||
|
* @see recordLastTransactionID()
|
||||||
|
*/
|
||||||
|
public function getLastTransactionID()
|
||||||
|
{
|
||||||
|
return $this->last_smtp_transaction_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
{
|
|
||||||
"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
AvocadoEdition_Light/plugin/PHPMailer/composer.lock
generated
3576
AvocadoEdition_Light/plugin/PHPMailer/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -58,46 +58,53 @@ class phpmailerAppException extends phpmailerException
|
||||||
$example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}";
|
$example_code .= "\n\nclass phpmailerAppException extends phpmailerException {}";
|
||||||
$example_code .= "\n\ntry {";
|
$example_code .= "\n\ntry {";
|
||||||
|
|
||||||
|
// Convert a string to its JavaScript representation.
|
||||||
|
function JSString($s) {
|
||||||
|
static $from = array("\\", "/", "\n", "\t", "\r", "\b", "\f", '"');
|
||||||
|
static $to = array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\\"');
|
||||||
|
return is_null($s)? 'null': '"' . str_replace($from, $to, "$s") . '"';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") {
|
if (isset($_POST["submit"]) && $_POST['submit'] == "Submit") {
|
||||||
$to = $_POST['To_Email'];
|
$to = $to_email;
|
||||||
if (!PHPMailer::validateAddress($to)) {
|
if (!PHPMailer::validateAddress($to)) {
|
||||||
throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!");
|
throw new phpmailerAppException("Email address " . $to . " is invalid -- aborting!");
|
||||||
}
|
}
|
||||||
|
|
||||||
$example_code .= "\n\$to = '{$_POST['To_Email']}';";
|
$example_code .= "\n\$to = '" . addslashes($to_email) . "';";
|
||||||
$example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {";
|
$example_code .= "\nif(!PHPMailer::validateAddress(\$to)) {";
|
||||||
$example_code .= "\n throw new phpmailerAppException(\"Email address \" . " .
|
$example_code .= "\n throw new phpmailerAppException(\"Email address \" . " .
|
||||||
"\$to . \" is invalid -- aborting!\");";
|
"\$to . \" is invalid -- aborting!\");";
|
||||||
$example_code .= "\n}";
|
$example_code .= "\n}";
|
||||||
|
|
||||||
switch ($_POST['test_type']) {
|
switch ($test_type) {
|
||||||
case 'smtp':
|
case 'smtp':
|
||||||
$mail->isSMTP(); // telling the class to use SMTP
|
$mail->isSMTP(); // telling the class to use SMTP
|
||||||
$mail->SMTPDebug = (integer)$_POST['smtp_debug'];
|
$mail->SMTPDebug = (integer)$smtp_debug;
|
||||||
$mail->Host = $_POST['smtp_server']; // SMTP server
|
$mail->Host = $smtp_server; // SMTP server
|
||||||
$mail->Port = (integer)$_POST['smtp_port']; // set the SMTP port
|
$mail->Port = (integer)$smtp_port; // set the SMTP port
|
||||||
if ($_POST['smtp_secure']) {
|
if ($smtp_secure) {
|
||||||
$mail->SMTPSecure = strtolower($_POST['smtp_secure']);
|
$mail->SMTPSecure = strtolower($smtp_secure);
|
||||||
}
|
}
|
||||||
$mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication?
|
$mail->SMTPAuth = array_key_exists('smtp_authenticate', $_POST); // enable SMTP authentication?
|
||||||
if (array_key_exists('smtp_authenticate', $_POST)) {
|
if (array_key_exists('smtp_authenticate', $_POST)) {
|
||||||
$mail->Username = $_POST['authenticate_username']; // SMTP account username
|
$mail->Username = $authenticate_username; // SMTP account username
|
||||||
$mail->Password = $_POST['authenticate_password']; // SMTP account password
|
$mail->Password = $authenticate_password; // SMTP account password
|
||||||
}
|
}
|
||||||
|
|
||||||
$example_code .= "\n\$mail->isSMTP();";
|
$example_code .= "\n\$mail->isSMTP();";
|
||||||
$example_code .= "\n\$mail->SMTPDebug = " . $_POST['smtp_debug'] . ";";
|
$example_code .= "\n\$mail->SMTPDebug = " . (integer) $smtp_debug . ";";
|
||||||
$example_code .= "\n\$mail->Host = \"" . $_POST['smtp_server'] . "\";";
|
$example_code .= "\n\$mail->Host = \"" . addslashes($smtp_server) . "\";";
|
||||||
$example_code .= "\n\$mail->Port = \"" . $_POST['smtp_port'] . "\";";
|
$example_code .= "\n\$mail->Port = \"" . addslashes($smtp_port) . "\";";
|
||||||
$example_code .= "\n\$mail->SMTPSecure = \"" . strtolower($_POST['smtp_secure']) . "\";";
|
$example_code .= "\n\$mail->SMTPSecure = \"" . addslashes(strtolower($smtp_secure)) . "\";";
|
||||||
$example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists(
|
$example_code .= "\n\$mail->SMTPAuth = " . (array_key_exists(
|
||||||
'smtp_authenticate',
|
'smtp_authenticate',
|
||||||
$_POST
|
$_POST
|
||||||
) ? 'true' : 'false') . ";";
|
) ? 'true' : 'false') . ";";
|
||||||
if (array_key_exists('smtp_authenticate', $_POST)) {
|
if (array_key_exists('smtp_authenticate', $_POST)) {
|
||||||
$example_code .= "\n\$mail->Username = \"" . $_POST['authenticate_username'] . "\";";
|
$example_code .= "\n\$mail->Username = \"" . addslashes($authenticate_username) . "\";";
|
||||||
$example_code .= "\n\$mail->Password = \"" . $_POST['authenticate_password'] . "\";";
|
$example_code .= "\n\$mail->Password = \"" . addslashes($authenticate_password) . "\";";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'mail':
|
case 'mail':
|
||||||
|
|
@ -118,59 +125,59 @@ try {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($_POST['From_Name'] != '') {
|
if ($_POST['From_Name'] != '') {
|
||||||
$mail->addReplyTo($_POST['From_Email'], $_POST['From_Name']);
|
$mail->addReplyTo($from_email, $from_name);
|
||||||
$mail->setFrom($_POST['From_Email'], $_POST['From_Name']);
|
$mail->setFrom($from_email, $from_name);
|
||||||
|
|
||||||
$example_code .= "\n\$mail->addReplyTo(\"" .
|
$example_code .= "\n\$mail->addReplyTo(\"" .
|
||||||
$_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");";
|
addslashes($from_email) . "\", \"" . addslashes($from_name) . "\");";
|
||||||
$example_code .= "\n\$mail->setFrom(\"" .
|
$example_code .= "\n\$mail->setFrom(\"" .
|
||||||
$_POST['From_Email'] . "\", \"" . $_POST['From_Name'] . "\");";
|
addslashes($from_email) . "\", \"" . addslashes($from_name) . "\");";
|
||||||
} else {
|
} else {
|
||||||
$mail->addReplyTo($_POST['From_Email']);
|
$mail->addReplyTo($from_email);
|
||||||
$mail->setFrom($_POST['From_Email'], $_POST['From_Email']);
|
$mail->setFrom($from_email, $from_email);
|
||||||
|
|
||||||
$example_code .= "\n\$mail->addReplyTo(\"" . $_POST['From_Email'] . "\");";
|
$example_code .= "\n\$mail->addReplyTo(\"" . addslashes($from_email) . "\");";
|
||||||
$example_code .= "\n\$mail->setFrom(\"" .
|
$example_code .= "\n\$mail->setFrom(\"" .
|
||||||
$_POST['From_Email'] . "\", \"" . $_POST['From_Email'] . "\");";
|
addslashes($from_email) . "\", \"" . addslashes($from_email) . "\");";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['To_Name'] != '') {
|
if ($_POST['To_Name'] != '') {
|
||||||
$mail->addAddress($to, $_POST['To_Name']);
|
$mail->addAddress($to, $to_name);
|
||||||
$example_code .= "\n\$mail->addAddress(\"$to\", \"" . $_POST['To_Name'] . "\");";
|
$example_code .= "\n\$mail->addAddress(\"$to\", \"" . addslashes($to_name) . "\");";
|
||||||
} else {
|
} else {
|
||||||
$mail->addAddress($to);
|
$mail->addAddress($to);
|
||||||
$example_code .= "\n\$mail->addAddress(\"$to\");";
|
$example_code .= "\n\$mail->addAddress(\"$to\");";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['bcc_Email'] != '') {
|
if ($_POST['bcc_Email'] != '') {
|
||||||
$indiBCC = explode(" ", $_POST['bcc_Email']);
|
$indiBCC = explode(" ", $bcc_email);
|
||||||
foreach ($indiBCC as $key => $value) {
|
foreach ($indiBCC as $key => $value) {
|
||||||
$mail->addBCC($value);
|
$mail->addBCC($value);
|
||||||
$example_code .= "\n\$mail->addBCC(\"$value\");";
|
$example_code .= "\n\$mail->addBCC(\"" . addslashes($value) . "\");";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['cc_Email'] != '') {
|
if ($_POST['cc_Email'] != '') {
|
||||||
$indiCC = explode(" ", $_POST['cc_Email']);
|
$indiCC = explode(" ", $cc_Email);
|
||||||
foreach ($indiCC as $key => $value) {
|
foreach ($indiCC as $key => $value) {
|
||||||
$mail->addCC($value);
|
$mail->addCC($value);
|
||||||
$example_code .= "\n\$mail->addCC(\"$value\");";
|
$example_code .= "\n\$mail->addCC(\"" . addslashes($value) . "\");";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (phpmailerException $e) { //Catch all kinds of bad addressing
|
} catch (phpmailerException $e) { //Catch all kinds of bad addressing
|
||||||
throw new phpmailerAppException($e->getMessage());
|
throw new phpmailerAppException($e->getMessage());
|
||||||
}
|
}
|
||||||
$mail->Subject = $_POST['Subject'] . ' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')';
|
$mail->Subject = $subject . ' (PHPMailer test using ' . strtoupper($test_type) . ')';
|
||||||
$example_code .= "\n\$mail->Subject = \"" . $_POST['Subject'] .
|
$example_code .= "\n\$mail->Subject = \"" . addslashes($subject) .
|
||||||
' (PHPMailer test using ' . strtoupper($_POST['test_type']) . ')";';
|
' (PHPMailer test using ' . addslashes(strtoupper($test_type)) . ')";';
|
||||||
|
|
||||||
if ($_POST['Message'] == '') {
|
if ($_POST['Message'] == '') {
|
||||||
$body = file_get_contents('contents.html');
|
$body = file_get_contents('contents.html');
|
||||||
} else {
|
} else {
|
||||||
$body = $_POST['Message'];
|
$body = $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
$example_code .= "\n\$body = <<<'EOT'\n" . htmlentities($body) . "\nEOT;";
|
$example_code .= "\n\$body = <<<'EOT'\n$body\nEOT;";
|
||||||
|
|
||||||
$mail->WordWrap = 78; // set word wrap to the RFC2822 limit
|
$mail->WordWrap = 78; // set word wrap to the RFC2822 limit
|
||||||
$mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images
|
$mail->msgHTML($body, dirname(__FILE__), true); //Create message bodies and embed images
|
||||||
|
|
@ -187,7 +194,7 @@ try {
|
||||||
$example_code .= "\n\ntry {";
|
$example_code .= "\n\ntry {";
|
||||||
$example_code .= "\n \$mail->send();";
|
$example_code .= "\n \$mail->send();";
|
||||||
$example_code .= "\n \$results_messages[] = \"Message has been sent using " .
|
$example_code .= "\n \$results_messages[] = \"Message has been sent using " .
|
||||||
strtoupper($_POST['test_type']) . "\";";
|
addslashes(strtoupper($test_type)) . "\";";
|
||||||
$example_code .= "\n}";
|
$example_code .= "\n}";
|
||||||
$example_code .= "\ncatch (phpmailerException \$e) {";
|
$example_code .= "\ncatch (phpmailerException \$e) {";
|
||||||
$example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());";
|
$example_code .= "\n throw new phpmailerAppException('Unable to send to: ' . \$to. ': '.\$e->getMessage());";
|
||||||
|
|
@ -195,7 +202,7 @@ try {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$results_messages[] = "Message has been sent using " . strtoupper($_POST["test_type"]);
|
$results_messages[] = "Message has been sent using " . strtoupper($test_type);
|
||||||
} catch (phpmailerException $e) {
|
} catch (phpmailerException $e) {
|
||||||
throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage());
|
throw new phpmailerAppException("Unable to send to: " . $to . ': ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -309,22 +316,22 @@ $example_code .= "\n}";
|
||||||
|
|
||||||
function startAgain() {
|
function startAgain() {
|
||||||
var post_params = {
|
var post_params = {
|
||||||
"From_Name": "<?php echo $from_name; ?>",
|
"From_Name": <?php echo JSString($from_name); ?>,
|
||||||
"From_Email": "<?php echo $from_email; ?>",
|
"From_Email": <?php echo JSString($from_email); ?>,
|
||||||
"To_Name": "<?php echo $to_name; ?>",
|
"To_Name": <?php echo JSString($to_name); ?>,
|
||||||
"To_Email": "<?php echo $to_email; ?>",
|
"To_Email": <?php echo JSString($to_email); ?>,
|
||||||
"cc_Email": "<?php echo $cc_email; ?>",
|
"cc_Email": <?php echo JSString($cc_email); ?>,
|
||||||
"bcc_Email": "<?php echo $bcc_email; ?>",
|
"bcc_Email": <?php echo JSString($bcc_email); ?>,
|
||||||
"Subject": "<?php echo $subject; ?>",
|
"Subject": <?php echo JSString($subject); ?>,
|
||||||
"Message": "<?php echo $message; ?>",
|
"Message": <?php echo JSString($message); ?>,
|
||||||
"test_type": "<?php echo $test_type; ?>",
|
"test_type": <?php echo JSString($test_type); ?>,
|
||||||
"smtp_debug": "<?php echo $smtp_debug; ?>",
|
"smtp_debug": <?php echo JSString($smtp_debug); ?>,
|
||||||
"smtp_server": "<?php echo $smtp_server; ?>",
|
"smtp_server": <?php echo JSString($smtp_server); ?>,
|
||||||
"smtp_port": "<?php echo $smtp_port; ?>",
|
"smtp_port": <?php echo JSString($smtp_port); ?>,
|
||||||
"smtp_secure": "<?php echo $smtp_secure; ?>",
|
"smtp_secure": <?php echo JSString($smtp_secure); ?>,
|
||||||
"smtp_authenticate": "<?php echo $smtp_authenticate; ?>",
|
"smtp_authenticate": <?php echo JSString($smtp_authenticate); ?>,
|
||||||
"authenticate_username": "<?php echo $authenticate_username; ?>",
|
"authenticate_username": <?php echo JSString($authenticate_username); ?>,
|
||||||
"authenticate_password": "<?php echo $authenticate_password; ?>"
|
"authenticate_password": <?php echo JSString($authenticate_password); ?>
|
||||||
};
|
};
|
||||||
|
|
||||||
var resetForm = document.createElement("form");
|
var resetForm = document.createElement("form");
|
||||||
|
|
@ -374,7 +381,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
echo "<button type=\"submit\" onclick=\"startAgain();\">Start Over</button><br>\n";
|
echo "<button type=\"submit\" onclick=\"startAgain();\">Start Over</button><br>\n";
|
||||||
echo "<br><span>Script:</span>\n";
|
echo "<br><span>Script:</span>\n";
|
||||||
echo "<pre class=\"brush: php;\">\n";
|
echo "<pre class=\"brush: php;\">\n";
|
||||||
echo $example_code;
|
echo htmlentities($example_code);
|
||||||
echo "\n</pre>\n";
|
echo "\n</pre>\n";
|
||||||
echo "\n<hr style=\"margin: 3em;\">\n";
|
echo "\n<hr style=\"margin: 3em;\">\n";
|
||||||
}
|
}
|
||||||
|
|
@ -390,7 +397,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<label for="From_Name"><strong>From</strong> Name</label>
|
<label for="From_Name"><strong>From</strong> Name</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="From_Name" name="From_Name" value="<?php echo $from_name; ?>"
|
<input type="text" id="From_Name" name="From_Name" value="<?php echo htmlentities($from_name); ?>"
|
||||||
style="width:95%;" autofocus placeholder="Your Name">
|
style="width:95%;" autofocus placeholder="Your Name">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -399,7 +406,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<label for="From_Email"><strong>From</strong> Email Address</label>
|
<label for="From_Email"><strong>From</strong> Email Address</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="From_Email" name="From_Email" value="<?php echo $from_email; ?>"
|
<input type="text" id="From_Email" name="From_Email" value="<?php echo htmlentities($from_email); ?>"
|
||||||
style="width:95%;" required placeholder="Your.Email@example.com">
|
style="width:95%;" required placeholder="Your.Email@example.com">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -408,7 +415,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<label for="To_Name"><strong>To</strong> Name</label>
|
<label for="To_Name"><strong>To</strong> Name</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="To_Name" name="To_Name" value="<?php echo $to_name; ?>"
|
<input type="text" id="To_Name" name="To_Name" value="<?php echo htmlentities($to_name); ?>"
|
||||||
style="width:95%;" placeholder="Recipient's Name">
|
style="width:95%;" placeholder="Recipient's Name">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -417,7 +424,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<label for="To_Email"><strong>To</strong> Email Address</label>
|
<label for="To_Email"><strong>To</strong> Email Address</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="To_Email" name="To_Email" value="<?php echo $to_email; ?>"
|
<input type="text" id="To_Email" name="To_Email" value="<?php echo htmlentities($to_email); ?>"
|
||||||
style="width:95%;" required placeholder="Recipients.Email@example.com">
|
style="width:95%;" required placeholder="Recipients.Email@example.com">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -428,7 +435,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="cc_Email" name="cc_Email" value="<?php echo $cc_email; ?>"
|
<input type="text" id="cc_Email" name="cc_Email" value="<?php echo htmlentities($cc_email); ?>"
|
||||||
style="width:95%;" placeholder="cc1@example.com, cc2@example.com">
|
style="width:95%;" placeholder="cc1@example.com, cc2@example.com">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -439,7 +446,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="bcc_Email" name="bcc_Email" value="<?php echo $bcc_email; ?>"
|
<input type="text" id="bcc_Email" name="bcc_Email" value="<?php echo htmlentities($bcc_email); ?>"
|
||||||
style="width:95%;" placeholder="bcc1@example.com, bcc2@example.com">
|
style="width:95%;" placeholder="bcc1@example.com, bcc2@example.com">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -448,7 +455,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<label for="Subject"><strong>Subject</strong></label>
|
<label for="Subject"><strong>Subject</strong></label>
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" name="Subject" id="Subject" value="<?php echo $subject; ?>"
|
<input type="text" name="Subject" id="Subject" value="<?php echo htmlentities($subject); ?>"
|
||||||
style="width:95%;" placeholder="Email Subject">
|
style="width:95%;" placeholder="Email Subject">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -460,7 +467,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
</td>
|
</td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<textarea name="Message" id="Message" style="width:95%;height:5em;"
|
<textarea name="Message" id="Message" style="width:95%;height:5em;"
|
||||||
placeholder="Body of your email"><?php echo $message; ?></textarea>
|
placeholder="Body of your email"><?php echo htmlentities($message); ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -531,7 +538,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<td class="colleft"><label for="smtp_server">SMTP Server</label></td>
|
<td class="colleft"><label for="smtp_server">SMTP Server</label></td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="smtp_server" name="smtp_server"
|
<input type="text" id="smtp_server" name="smtp_server"
|
||||||
value="<?php echo $smtp_server; ?>" style="width:95%;"
|
value="<?php echo htmlentities($smtp_server); ?>" style="width:95%;"
|
||||||
placeholder="smtp.server.com">
|
placeholder="smtp.server.com">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -539,7 +546,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<td class="colleft" style="width: 5em;"><label for="smtp_port">SMTP Port</label></td>
|
<td class="colleft" style="width: 5em;"><label for="smtp_port">SMTP Port</label></td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" name="smtp_port" id="smtp_port" size="3"
|
<input type="text" name="smtp_port" id="smtp_port" size="3"
|
||||||
value="<?php echo $smtp_port; ?>" placeholder="Port">
|
value="<?php echo htmlentities($smtp_port); ?>" placeholder="Port">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -560,14 +567,14 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<?php if ($smtp_authenticate != '') {
|
<?php if ($smtp_authenticate != '') {
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>
|
} ?>
|
||||||
value="<?php echo $smtp_authenticate; ?>">
|
value="true">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="colleft"><label for="authenticate_username">Authenticate Username</label></td>
|
<td class="colleft"><label for="authenticate_username">Authenticate Username</label></td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="text" id="authenticate_username" name="authenticate_username"
|
<input type="text" id="authenticate_username" name="authenticate_username"
|
||||||
value="<?php echo $authenticate_username; ?>" style="width:95%;"
|
value="<?php echo htmlentities($authenticate_username); ?>" style="width:95%;"
|
||||||
placeholder="SMTP Server Username">
|
placeholder="SMTP Server Username">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -575,7 +582,7 @@ if (isset($_POST["submit"]) && $_POST["submit"] == "Submit") {
|
||||||
<td class="colleft"><label for="authenticate_password">Authenticate Password</label></td>
|
<td class="colleft"><label for="authenticate_password">Authenticate Password</label></td>
|
||||||
<td class="colrite">
|
<td class="colrite">
|
||||||
<input type="password" name="authenticate_password" id="authenticate_password"
|
<input type="password" name="authenticate_password" id="authenticate_password"
|
||||||
value="<?php echo $authenticate_password; ?>" style="width:95%;"
|
value="<?php echo htmlentities($authenticate_password); ?>" style="width:95%;"
|
||||||
placeholder="SMTP Server Password">
|
placeholder="SMTP Server Password">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* This example shows settings to use when sending via Google's Gmail servers.
|
* This example shows settings to use when sending via Google's Gmail servers.
|
||||||
|
* The IMAP section shows how to save this message to the 'Sent Mail' folder using IMAP commands.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//SMTP needs accurate times, and the PHP time zone MUST be set
|
//SMTP needs accurate times, and the PHP time zone MUST be set
|
||||||
|
|
@ -72,4 +73,27 @@ if (!$mail->send()) {
|
||||||
echo "Mailer Error: " . $mail->ErrorInfo;
|
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||||
} else {
|
} else {
|
||||||
echo "Message sent!";
|
echo "Message sent!";
|
||||||
|
//Section 2: IMAP
|
||||||
|
//Uncomment these to save your message in the 'Sent Mail' folder.
|
||||||
|
#if (save_mail($mail)) {
|
||||||
|
# echo "Message saved!";
|
||||||
|
#}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Section 2: IMAP
|
||||||
|
//IMAP commands requires the PHP IMAP Extension, found at: https://php.net/manual/en/imap.setup.php
|
||||||
|
//Function to call which uses the PHP imap_*() functions to save messages: https://php.net/manual/en/book.imap.php
|
||||||
|
//You can use imap_getmailboxes($imapStream, '/imap/ssl') to get a list of available folders or labels, this can
|
||||||
|
//be useful if you are trying to get this working on a non-Gmail IMAP server.
|
||||||
|
function save_mail($mail) {
|
||||||
|
//You can change 'Sent Mail' to any other folder or tag
|
||||||
|
$path = "{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail";
|
||||||
|
|
||||||
|
//Tell your server to open an IMAP connection using the same username and password as you used for SMTP
|
||||||
|
$imapStream = imap_open($path, $mail->Username, $mail->Password);
|
||||||
|
|
||||||
|
$result = imap_append($imapStream, $path, $mail->getSentMIMEMessage());
|
||||||
|
imap_close($imapStream);
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ $mail->SMTPAuth = true;
|
||||||
//Set AuthType
|
//Set AuthType
|
||||||
$mail->AuthType = 'XOAUTH2';
|
$mail->AuthType = 'XOAUTH2';
|
||||||
|
|
||||||
//User Email to use for SMTP authentication - Use the same Email used in Google Developer Console
|
//User Email to use for SMTP authentication - user who gave consent to our app
|
||||||
$mail->oauthUserEmail = "someone@gmail.com";
|
$mail->oauthUserEmail = "from@gmail.com";
|
||||||
|
|
||||||
//Obtained From Google Developer Console
|
//Obtained From Google Developer Console
|
||||||
$mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com";
|
$mail->oauthClientId = "RANDOMCHARS-----duv1n2.apps.googleusercontent.com";
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,9 @@ function tln_tagprint($tagname, $attary, $tagtype)
|
||||||
$fulltag = '</' . $tagname . '>';
|
$fulltag = '</' . $tagname . '>';
|
||||||
} else {
|
} else {
|
||||||
$fulltag = '<' . $tagname;
|
$fulltag = '<' . $tagname;
|
||||||
if (is_array($attary) && sizeof($attary)) {
|
if (is_array($attary) && count($attary)) {
|
||||||
$atts = array();
|
$atts = array();
|
||||||
while (list($attname, $attvalue) = each($attary)) {
|
foreach($attary as $attname => $attvalue) {
|
||||||
array_push($atts, "$attname=$attvalue");
|
array_push($atts, "$attname=$attvalue");
|
||||||
}
|
}
|
||||||
$fulltag .= ' ' . join(' ', $atts);
|
$fulltag .= ' ' . join(' ', $atts);
|
||||||
|
|
@ -84,7 +84,7 @@ function tln_casenormalize(&$val)
|
||||||
function tln_skipspace($body, $offset)
|
function tln_skipspace($body, $offset)
|
||||||
{
|
{
|
||||||
preg_match('/^(\s*)/s', substr($body, $offset), $matches);
|
preg_match('/^(\s*)/s', substr($body, $offset), $matches);
|
||||||
if (sizeof($matches[1])) {
|
if (count($matches[1])) {
|
||||||
$count = strlen($matches[1]);
|
$count = strlen($matches[1]);
|
||||||
$offset += $count;
|
$offset += $count;
|
||||||
}
|
}
|
||||||
|
|
@ -348,7 +348,7 @@ function tln_getnxtag($body, $offset)
|
||||||
}
|
}
|
||||||
//intentional fall-through
|
//intentional fall-through
|
||||||
case '>':
|
case '>':
|
||||||
$attary{$attname} = '"yes"';
|
$attary[$attname] = '"yes"';
|
||||||
return array($tagname, $attary, $tagtype, $lt, $pos);
|
return array($tagname, $attary, $tagtype, $lt, $pos);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -382,7 +382,7 @@ function tln_getnxtag($body, $offset)
|
||||||
}
|
}
|
||||||
list($pos, $attval, $match) = $regary;
|
list($pos, $attval, $match) = $regary;
|
||||||
$pos++;
|
$pos++;
|
||||||
$attary{$attname} = '\'' . $attval . '\'';
|
$attary[$attname] = '\'' . $attval . '\'';
|
||||||
} elseif ($quot == '"') {
|
} elseif ($quot == '"') {
|
||||||
$regary = tln_findnxreg($body, $pos + 1, '\"');
|
$regary = tln_findnxreg($body, $pos + 1, '\"');
|
||||||
if ($regary == false) {
|
if ($regary == false) {
|
||||||
|
|
@ -390,7 +390,7 @@ function tln_getnxtag($body, $offset)
|
||||||
}
|
}
|
||||||
list($pos, $attval, $match) = $regary;
|
list($pos, $attval, $match) = $regary;
|
||||||
$pos++;
|
$pos++;
|
||||||
$attary{$attname} = '"' . $attval . '"';
|
$attary[$attname] = '"' . $attval . '"';
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* These are hateful. Look for \s, or >.
|
* These are hateful. Look for \s, or >.
|
||||||
|
|
@ -404,13 +404,13 @@ function tln_getnxtag($body, $offset)
|
||||||
* If it's ">" it will be caught at the top.
|
* If it's ">" it will be caught at the top.
|
||||||
*/
|
*/
|
||||||
$attval = preg_replace('/\"/s', '"', $attval);
|
$attval = preg_replace('/\"/s', '"', $attval);
|
||||||
$attary{$attname} = '"' . $attval . '"';
|
$attary[$attname] = '"' . $attval . '"';
|
||||||
}
|
}
|
||||||
} elseif (preg_match('|[\w/>]|', $char)) {
|
} elseif (preg_match('|[\w/>]|', $char)) {
|
||||||
/**
|
/**
|
||||||
* That was attribute type 4.
|
* That was attribute type 4.
|
||||||
*/
|
*/
|
||||||
$attary{$attname} = '"yes"';
|
$attary[$attname] = '"yes"';
|
||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* An illegal character. Find next '>' and return.
|
* An illegal character. Find next '>' and return.
|
||||||
|
|
@ -439,14 +439,14 @@ function tln_getnxtag($body, $offset)
|
||||||
function tln_deent(&$attvalue, $regex, $hex = false)
|
function tln_deent(&$attvalue, $regex, $hex = false)
|
||||||
{
|
{
|
||||||
preg_match_all($regex, $attvalue, $matches);
|
preg_match_all($regex, $attvalue, $matches);
|
||||||
if (is_array($matches) && sizeof($matches[0]) > 0) {
|
if (is_array($matches) && count($matches[0]) > 0) {
|
||||||
$repl = array();
|
$repl = array();
|
||||||
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
for ($i = 0; $i < count($matches[0]); $i++) {
|
||||||
$numval = $matches[1][$i];
|
$numval = $matches[1][$i];
|
||||||
if ($hex) {
|
if ($hex) {
|
||||||
$numval = hexdec($numval);
|
$numval = hexdec($numval);
|
||||||
}
|
}
|
||||||
$repl{$matches[0][$i]} = chr($numval);
|
$repl[$matches[0][$i]] = chr($numval);
|
||||||
}
|
}
|
||||||
$attvalue = strtr($attvalue, $repl);
|
$attvalue = strtr($attvalue, $repl);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -520,7 +520,7 @@ function tln_fixatts(
|
||||||
$trans_image_path,
|
$trans_image_path,
|
||||||
$block_external_images
|
$block_external_images
|
||||||
) {
|
) {
|
||||||
while (list($attname, $attvalue) = each($attary)) {
|
foreach($attary as $attname => $attvalue) {
|
||||||
/**
|
/**
|
||||||
* See if this attribute should be removed.
|
* See if this attribute should be removed.
|
||||||
*/
|
*/
|
||||||
|
|
@ -528,7 +528,7 @@ function tln_fixatts(
|
||||||
if (preg_match($matchtag, $tagname)) {
|
if (preg_match($matchtag, $tagname)) {
|
||||||
foreach ($matchattrs as $matchattr) {
|
foreach ($matchattrs as $matchattr) {
|
||||||
if (preg_match($matchattr, $attname)) {
|
if (preg_match($matchattr, $attname)) {
|
||||||
unset($attary{$attname});
|
unset($attary[$attname]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -541,7 +541,7 @@ function tln_fixatts(
|
||||||
tln_defang($attvalue);
|
tln_defang($attvalue);
|
||||||
if ($attname == 'style' && $attvalue !== $oldattvalue) {
|
if ($attname == 'style' && $attvalue !== $oldattvalue) {
|
||||||
$attvalue = "idiocy";
|
$attvalue = "idiocy";
|
||||||
$attary{$attname} = $attvalue;
|
$attary[$attname] = $attvalue;
|
||||||
}
|
}
|
||||||
tln_unspace($attvalue);
|
tln_unspace($attvalue);
|
||||||
|
|
||||||
|
|
@ -563,7 +563,7 @@ function tln_fixatts(
|
||||||
list($valmatch, $valrepl) = $valary;
|
list($valmatch, $valrepl) = $valary;
|
||||||
$newvalue = preg_replace($valmatch, $valrepl, $attvalue);
|
$newvalue = preg_replace($valmatch, $valrepl, $attvalue);
|
||||||
if ($newvalue != $attvalue) {
|
if ($newvalue != $attvalue) {
|
||||||
$attary{$attname} = $newvalue;
|
$attary[$attname] = $newvalue;
|
||||||
$attvalue = $newvalue;
|
$attvalue = $newvalue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -572,14 +572,14 @@ function tln_fixatts(
|
||||||
}
|
}
|
||||||
if ($attname == 'style') {
|
if ($attname == 'style') {
|
||||||
if (preg_match('/[\0-\37\200-\377]+/', $attvalue)) {
|
if (preg_match('/[\0-\37\200-\377]+/', $attvalue)) {
|
||||||
$attary{$attname} = '"disallowed character"';
|
$attary[$attname] = '"disallowed character"';
|
||||||
}
|
}
|
||||||
preg_match_all("/url\s*\((.+)\)/si", $attvalue, $aMatch);
|
preg_match_all("/url\s*\((.+)\)/si", $attvalue, $aMatch);
|
||||||
if (count($aMatch)) {
|
if (count($aMatch)) {
|
||||||
foreach($aMatch[1] as $sMatch) {
|
foreach($aMatch[1] as $sMatch) {
|
||||||
$urlvalue = $sMatch;
|
$urlvalue = $sMatch;
|
||||||
tln_fixurl($attname, $urlvalue, $trans_image_path, $block_external_images);
|
tln_fixurl($attname, $urlvalue, $trans_image_path, $block_external_images);
|
||||||
$attary{$attname} = str_replace($sMatch, $urlvalue, $attvalue);
|
$attary[$attname] = str_replace($sMatch, $urlvalue, $attvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -671,7 +671,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||||
$bSucces = false;
|
$bSucces = false;
|
||||||
$bEndTag = false;
|
$bEndTag = false;
|
||||||
for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) {
|
for ($i=$pos,$iCount=strlen($body);$i<$iCount;++$i) {
|
||||||
$char = $body{$i};
|
$char = $body[$i];
|
||||||
switch ($char) {
|
switch ($char) {
|
||||||
case '<':
|
case '<':
|
||||||
$sToken = $char;
|
$sToken = $char;
|
||||||
|
|
@ -702,7 +702,7 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
|
||||||
case '!':
|
case '!':
|
||||||
if ($sToken == '<') {
|
if ($sToken == '<') {
|
||||||
// possible comment
|
// possible comment
|
||||||
if (isset($body{$i+2}) && substr($body,$i,3) == '!--') {
|
if (isset($body[$i+2]) && substr($body,$i,3) == '!--') {
|
||||||
$i = strpos($body,'-->',$i+3);
|
$i = strpos($body,'-->',$i+3);
|
||||||
if ($i === false) { // no end comment
|
if ($i === false) { // no end comment
|
||||||
$i = strlen($body);
|
$i = strlen($body);
|
||||||
|
|
@ -794,7 +794,7 @@ function tln_body2div($attary, $trans_image_path)
|
||||||
$text = '#000000';
|
$text = '#000000';
|
||||||
$has_bgc_stl = $has_txt_stl = false;
|
$has_bgc_stl = $has_txt_stl = false;
|
||||||
$styledef = '';
|
$styledef = '';
|
||||||
if (is_array($attary) && sizeof($attary) > 0){
|
if (is_array($attary) && count($attary) > 0){
|
||||||
foreach ($attary as $attname=>$attvalue){
|
foreach ($attary as $attname=>$attvalue){
|
||||||
$quotchar = substr($attvalue, 0, 1);
|
$quotchar = substr($attvalue, 0, 1);
|
||||||
$attvalue = str_replace($quotchar, "", $attvalue);
|
$attvalue = str_replace($quotchar, "", $attvalue);
|
||||||
|
|
@ -818,7 +818,7 @@ function tln_body2div($attary, $trans_image_path)
|
||||||
$styledef .= "color: $text; ";
|
$styledef .= "color: $text; ";
|
||||||
}
|
}
|
||||||
if (strlen($styledef) > 0){
|
if (strlen($styledef) > 0){
|
||||||
$divattary{"style"} = "\"$styledef\"";
|
$divattary["style"] = "\"$styledef\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $divattary;
|
return $divattary;
|
||||||
|
|
@ -914,10 +914,10 @@ function tln_sanitize(
|
||||||
if ($tagname == "body") {
|
if ($tagname == "body") {
|
||||||
$tagname = "div";
|
$tagname = "div";
|
||||||
}
|
}
|
||||||
if (isset($open_tags{$tagname}) &&
|
if (isset($open_tags[$tagname]) &&
|
||||||
$open_tags{$tagname} > 0
|
$open_tags[$tagname] > 0
|
||||||
) {
|
) {
|
||||||
$open_tags{$tagname}--;
|
$open_tags[$tagname]--;
|
||||||
} else {
|
} else {
|
||||||
$tagname = false;
|
$tagname = false;
|
||||||
}
|
}
|
||||||
|
|
@ -961,16 +961,16 @@ function tln_sanitize(
|
||||||
$attary = tln_body2div($attary, $trans_image_path);
|
$attary = tln_body2div($attary, $trans_image_path);
|
||||||
}
|
}
|
||||||
if ($tagtype == 1) {
|
if ($tagtype == 1) {
|
||||||
if (isset($open_tags{$tagname})) {
|
if (isset($open_tags[$tagname])) {
|
||||||
$open_tags{$tagname}++;
|
$open_tags[$tagname]++;
|
||||||
} else {
|
} else {
|
||||||
$open_tags{$tagname} = 1;
|
$open_tags[$tagname] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This is where we run other checks.
|
* This is where we run other checks.
|
||||||
*/
|
*/
|
||||||
if (is_array($attary) && sizeof($attary) > 0) {
|
if (is_array($attary) && count($attary) > 0) {
|
||||||
$attary = tln_fixatts(
|
$attary = tln_fixatts(
|
||||||
$tagname,
|
$tagname,
|
||||||
$attary,
|
$attary,
|
||||||
|
|
@ -1121,19 +1121,19 @@ function HTMLFilter($body, $trans_image_path, $block_external_images = false)
|
||||||
|
|
||||||
if ($block_external_images) {
|
if ($block_external_images) {
|
||||||
array_push(
|
array_push(
|
||||||
$bad_attvals{'/.*/'}{'/^src|background/i'}[0],
|
$bad_attvals['/.*/']['/^src|background/i'][0],
|
||||||
'/^([\'\"])\s*https*:.*([\'\"])/si'
|
'/^([\'\"])\s*https*:.*([\'\"])/si'
|
||||||
);
|
);
|
||||||
array_push(
|
array_push(
|
||||||
$bad_attvals{'/.*/'}{'/^src|background/i'}[1],
|
$bad_attvals['/.*/']['/^src|background/i'][1],
|
||||||
"\\1$trans_image_path\\1"
|
"\\1$trans_image_path\\1"
|
||||||
);
|
);
|
||||||
array_push(
|
array_push(
|
||||||
$bad_attvals{'/.*/'}{'/^style/i'}[0],
|
$bad_attvals['/.*/']['/^style/i'][0],
|
||||||
'/url\(([\'\"])\s*https*:.*([\'\"])\)/si'
|
'/url\(([\'\"])\s*https*:.*([\'\"])\)/si'
|
||||||
);
|
);
|
||||||
array_push(
|
array_push(
|
||||||
$bad_attvals{'/.*/'}{'/^style/i'}[1],
|
$bad_attvals['/.*/']['/^style/i'][1],
|
||||||
"url(\\1$trans_image_path\\1)"
|
"url(\\1$trans_image_path\\1)"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class ntlm_sasl_client_class
|
||||||
public function NTLMResponse($challenge, $password)
|
public function NTLMResponse($challenge, $password)
|
||||||
{
|
{
|
||||||
$unicode = $this->ASCIIToUnicode($password);
|
$unicode = $this->ASCIIToUnicode($password);
|
||||||
$md4 = mhash(MHASH_MD4, $unicode);
|
$md4 = hash('md4', $unicode, true);
|
||||||
$padded = $md4 . str_repeat(chr(0), 21 - strlen($md4));
|
$padded = $md4 . str_repeat(chr(0), 21 - strlen($md4));
|
||||||
$iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB);
|
$iv_size = mcrypt_get_iv_size(MCRYPT_DES, MCRYPT_MODE_ECB);
|
||||||
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
|
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Bosnian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Ermin Islamagić <ermin@islamagic.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne moguće se spojiti sa SMTP serverom.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: ';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: ';
|
||||||
|
$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';
|
||||||
|
|
@ -22,4 +22,4 @@ $PHPMAILER_LANG['signing'] = 'Chyba přihlašování: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
|
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
|
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Chybí rozšíření: ';
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Norwegian PHPMailer language file: refer to English translation for definitive list
|
* Norwegian Bokmål PHPMailer language file: refer to English translation for definitive list
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
|
$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['data_not_accepted'] = 'SMTP Feil: Datainnhold ikke akseptert.';
|
||||||
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
|
$PHPMAILER_LANG['empty_message'] = 'Melding kropp tomt';
|
||||||
$PHPMAILER_LANG['encoding'] = 'Ukjent tegnkoding: ';
|
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
|
||||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
|
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
|
||||||
$PHPMAILER_LANG['file_open'] = 'Fil feil: Kunne ikke åpne filen: ';
|
$PHPMAILER_LANG['file_open'] = 'Fil Feil: Kunne ikke åpne filen: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Følgende avsenderadresse feilet: ';
|
$PHPMAILER_LANG['from_failed'] = 'Følgende Frå adresse feilet: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere mailfunksjonen.';
|
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere post funksjon.';
|
||||||
$PHPMAILER_LANG['invalid_address'] = 'Meldingen ble ikke sendt, følgende adresse er ugyldig: ';
|
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
|
||||||
$PHPMAILER_LANG['provide_address'] = 'Du må angi minst en mottakeradresse.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer er ikke supportert.';
|
$PHPMAILER_LANG['provide_address'] = 'Du må opppgi minst en mottakeradresse.';
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet: ';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
|
||||||
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
|
$PHPMAILER_LANG['signing'] = 'Signering Feil: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() feilet.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP server feil: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
|
$PHPMAILER_LANG['variable_set'] = 'Kan ikke skrive eller omskrive variabel: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
* @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
|
* @author Paulo Henrique Garcia <paulo@controllerweb.com.br>
|
||||||
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
||||||
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
|
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
|
||||||
|
* @author Fabio Beneditto <fabiobeneditto@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||||
|
|
@ -15,7 +16,7 @@ $PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||||
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||||
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
$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['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||||
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remententes falharam: ';
|
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: ';
|
||||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
|
$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['invalid_address'] = 'Endereço de e-mail inválido: ';
|
||||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Serbian PHPMailer language file: refer to English translation for definitive list
|
||||||
|
* @package PHPMailer
|
||||||
|
* @author Александар Јевремовић <ajevremovic@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.';
|
||||||
|
$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: није могуће повезивање са SMTP сервером.';
|
||||||
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.';
|
||||||
|
$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.';
|
||||||
|
$PHPMAILER_LANG['encoding'] = 'Непознато кодовање: ';
|
||||||
|
$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: ';
|
||||||
|
$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: ';
|
||||||
|
$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: ';
|
||||||
|
$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: ';
|
||||||
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: ';
|
||||||
|
$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.';
|
||||||
|
$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе: ';
|
||||||
|
$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.';
|
||||||
|
$PHPMAILER_LANG['provide_address'] = 'Потребно је задати најмање једну адресу.';
|
||||||
|
$PHPMAILER_LANG['signing'] = 'Грешка приликом пријављивања: ';
|
||||||
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.';
|
||||||
|
$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: ';
|
||||||
|
$PHPMAILER_LANG['variable_set'] = 'Није могуће задати променљиву, нити је вратити уназад: ';
|
||||||
|
$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: ';
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
* @author Can Yılmaz
|
* @author Can Yılmaz
|
||||||
* @author Mehmet Benlioğlu
|
* @author Mehmet Benlioğlu
|
||||||
* @author @yasinaydin
|
* @author @yasinaydin
|
||||||
|
* @author Ogün Karakuş
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
|
||||||
|
|
@ -26,4 +27,4 @@ $PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
|
||||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
|
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
|
||||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
|
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
|
||||||
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
|
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: ';
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@
|
||||||
* @package PHPMailer
|
* @package PHPMailer
|
||||||
* @author liqwei <liqwei@liqwei.com>
|
* @author liqwei <liqwei@liqwei.com>
|
||||||
* @author young <masxy@foxmail.com>
|
* @author young <masxy@foxmail.com>
|
||||||
|
* @author Teddysun <i@teddysun.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
|
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
|
||||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
|
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
|
||||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
||||||
$PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
|
$PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
|
||||||
$PHPMAILER_LANG['encoding'] = '未知编码: ';
|
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||||
$PHPMAILER_LANG['execute'] = '无法执行:';
|
$PHPMAILER_LANG['execute'] = '无法执行:';
|
||||||
$PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
$PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
||||||
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
||||||
|
|
@ -22,6 +23,6 @@ $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地
|
||||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||||
$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'] = '无法设置或重置变量:';
|
||||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue