Add php files
This commit is contained in:
49
mailer/PHPMailerAutoload.php
Executable file
49
mailer/PHPMailerAutoload.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* PHP Version 5
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2014 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
function PHPMailerAutoload($classname)
|
||||
{
|
||||
//Can't use __DIR__ as it's only in PHP 5.3+
|
||||
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
|
||||
if (is_readable($filename)) {
|
||||
require $filename;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
||||
//SPL autoloading was introduced in PHP 5.1.2
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
}
|
||||
3457
mailer/class.phpmailer.php
Executable file
3457
mailer/class.phpmailer.php
Executable file
File diff suppressed because it is too large
Load Diff
397
mailer/class.pop3.php
Executable file
397
mailer/class.pop3.php
Executable file
@@ -0,0 +1,397 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||
* PHP Version 5
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2014 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer POP-Before-SMTP Authentication Class.
|
||||
* Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
|
||||
* Does not support APOP.
|
||||
* @package PHPMailer
|
||||
* @author Richard Davey (original author) <rich@corephp.co.uk>
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
*/
|
||||
class POP3
|
||||
{
|
||||
/**
|
||||
* The POP3 PHPMailer Version number.
|
||||
* @type string
|
||||
* @access public
|
||||
*/
|
||||
public $Version = '5.2.9';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
* @type integer
|
||||
* @access public
|
||||
*/
|
||||
public $POP3_PORT = 110;
|
||||
|
||||
/**
|
||||
* Default timeout in seconds.
|
||||
* @type integer
|
||||
* @access public
|
||||
*/
|
||||
public $POP3_TIMEOUT = 30;
|
||||
|
||||
/**
|
||||
* POP3 Carriage Return + Line Feed.
|
||||
* @type string
|
||||
* @access public
|
||||
* @deprecated Use the constant instead
|
||||
*/
|
||||
public $CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Debug display level.
|
||||
* Options: 0 = no, 1+ = yes
|
||||
* @type integer
|
||||
* @access public
|
||||
*/
|
||||
public $do_debug = 0;
|
||||
|
||||
/**
|
||||
* POP3 mail server hostname.
|
||||
* @type string
|
||||
* @access public
|
||||
*/
|
||||
public $host;
|
||||
|
||||
/**
|
||||
* POP3 port number.
|
||||
* @type integer
|
||||
* @access public
|
||||
*/
|
||||
public $port;
|
||||
|
||||
/**
|
||||
* POP3 Timeout Value in seconds.
|
||||
* @type integer
|
||||
* @access public
|
||||
*/
|
||||
public $tval;
|
||||
|
||||
/**
|
||||
* POP3 username
|
||||
* @type string
|
||||
* @access public
|
||||
*/
|
||||
public $username;
|
||||
|
||||
/**
|
||||
* POP3 password.
|
||||
* @type string
|
||||
* @access public
|
||||
*/
|
||||
public $password;
|
||||
|
||||
/**
|
||||
* Resource handle for the POP3 connection socket.
|
||||
* @type resource
|
||||
* @access private
|
||||
*/
|
||||
private $pop_conn;
|
||||
|
||||
/**
|
||||
* Are we connected?
|
||||
* @type boolean
|
||||
* @access private
|
||||
*/
|
||||
private $connected = false;
|
||||
|
||||
/**
|
||||
* Error container.
|
||||
* @type array
|
||||
* @access private
|
||||
*/
|
||||
private $errors = array();
|
||||
|
||||
/**
|
||||
* Line break constant
|
||||
*/
|
||||
const CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Simple static wrapper for all-in-one POP before SMTP
|
||||
* @param $host
|
||||
* @param boolean $port
|
||||
* @param boolean $tval
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param integer $debug_level
|
||||
* @return boolean
|
||||
*/
|
||||
public static function popBeforeSmtp(
|
||||
$host,
|
||||
$port = false,
|
||||
$tval = false,
|
||||
$username = '',
|
||||
$password = '',
|
||||
$debug_level = 0
|
||||
) {
|
||||
$pop = new POP3;
|
||||
return $pop->authorise($host, $port, $tval, $username, $password, $debug_level);
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate with a POP3 server.
|
||||
* A connect, login, disconnect sequence
|
||||
* appropriate for POP-before SMTP authorisation.
|
||||
* @access public
|
||||
* @param string $host The hostname to connect to
|
||||
* @param integer|boolean $port The port number to connect to
|
||||
* @param integer|boolean $timeout The timeout value
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param integer $debug_level
|
||||
* @return boolean
|
||||
*/
|
||||
public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
|
||||
{
|
||||
$this->host = $host;
|
||||
// If no port value provided, use default
|
||||
if ($port === false) {
|
||||
$this->port = $this->POP3_PORT;
|
||||
} else {
|
||||
$this->port = (integer)$port;
|
||||
}
|
||||
// If no timeout value provided, use default
|
||||
if ($timeout === false) {
|
||||
$this->tval = $this->POP3_TIMEOUT;
|
||||
} else {
|
||||
$this->tval = (integer)$timeout;
|
||||
}
|
||||
$this->do_debug = $debug_level;
|
||||
$this->username = $username;
|
||||
$this->password = $password;
|
||||
// Reset the error log
|
||||
$this->errors = array();
|
||||
// connect
|
||||
$result = $this->connect($this->host, $this->port, $this->tval);
|
||||
if ($result) {
|
||||
$login_result = $this->login($this->username, $this->password);
|
||||
if ($login_result) {
|
||||
$this->disconnect();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// We need to disconnect regardless of whether the login succeeded
|
||||
$this->disconnect();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to a POP3 server.
|
||||
* @access public
|
||||
* @param string $host
|
||||
* @param integer|boolean $port
|
||||
* @param integer $tval
|
||||
* @return boolean
|
||||
*/
|
||||
public function connect($host, $port = false, $tval = 30)
|
||||
{
|
||||
// Are we already connected?
|
||||
if ($this->connected) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//On Windows this will raise a PHP Warning error if the hostname doesn't exist.
|
||||
//Rather than suppress it with @fsockopen, capture it cleanly instead
|
||||
set_error_handler(array($this, 'catchWarning'));
|
||||
|
||||
if ($port === false) {
|
||||
$port = $this->POP3_PORT;
|
||||
}
|
||||
|
||||
// connect to the POP3 server
|
||||
$this->pop_conn = fsockopen(
|
||||
$host, // POP3 Host
|
||||
$port, // Port #
|
||||
$errno, // Error Number
|
||||
$errstr, // Error Message
|
||||
$tval
|
||||
); // Timeout (seconds)
|
||||
// Restore the error handler
|
||||
restore_error_handler();
|
||||
|
||||
// Did we connect?
|
||||
if ($this->pop_conn === false) {
|
||||
// It would appear not...
|
||||
$this->setError(array(
|
||||
'error' => "Failed to connect to server $host on port $port",
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr
|
||||
));
|
||||
return false;
|
||||
}
|
||||
|
||||
// Increase the stream time-out
|
||||
stream_set_timeout($this->pop_conn, $tval, 0);
|
||||
|
||||
// Get the POP3 server response
|
||||
$pop3_response = $this->getResponse();
|
||||
// Check for the +OK
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
// The connection is established and the POP3 server is talking
|
||||
$this->connected = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log in to the POP3 server.
|
||||
* Does not support APOP (RFC 2828, 4949).
|
||||
* @access public
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @return boolean
|
||||
*/
|
||||
public function login($username = '', $password = '')
|
||||
{
|
||||
if (!$this->connected) {
|
||||
$this->setError('Not connected to POP3 server');
|
||||
}
|
||||
if (empty($username)) {
|
||||
$username = $this->username;
|
||||
}
|
||||
if (empty($password)) {
|
||||
$password = $this->password;
|
||||
}
|
||||
|
||||
// Send the Username
|
||||
$this->sendString("USER $username" . self::CRLF);
|
||||
$pop3_response = $this->getResponse();
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
// Send the Password
|
||||
$this->sendString("PASS $password" . self::CRLF);
|
||||
$pop3_response = $this->getResponse();
|
||||
if ($this->checkResponse($pop3_response)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from the POP3 server.
|
||||
* @access public
|
||||
*/
|
||||
public function disconnect()
|
||||
{
|
||||
$this->sendString('QUIT');
|
||||
//The QUIT command may cause the daemon to exit, which will kill our connection
|
||||
//So ignore errors here
|
||||
try {
|
||||
@fclose($this->pop_conn);
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a response from the POP3 server.
|
||||
* $size is the maximum number of bytes to retrieve
|
||||
* @param integer $size
|
||||
* @return string
|
||||
* @access private
|
||||
*/
|
||||
private function getResponse($size = 128)
|
||||
{
|
||||
$response = fgets($this->pop_conn, $size);
|
||||
if ($this->do_debug >= 1) {
|
||||
echo "Server -> Client: $response";
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send raw data to the POP3 server.
|
||||
* @param string $string
|
||||
* @return integer
|
||||
* @access private
|
||||
*/
|
||||
private function sendString($string)
|
||||
{
|
||||
if ($this->pop_conn) {
|
||||
if ($this->do_debug >= 2) { //Show client messages when debug >= 2
|
||||
echo "Client -> Server: $string";
|
||||
}
|
||||
return fwrite($this->pop_conn, $string, strlen($string));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the POP3 server response.
|
||||
* Looks for for +OK or -ERR.
|
||||
* @param string $string
|
||||
* @return boolean
|
||||
* @access private
|
||||
*/
|
||||
private function checkResponse($string)
|
||||
{
|
||||
if (substr($string, 0, 3) !== '+OK') {
|
||||
$this->setError(array(
|
||||
'error' => "Server reported an error: $string",
|
||||
'errno' => 0,
|
||||
'errstr' => ''
|
||||
));
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an error to the internal error store.
|
||||
* Also display debug output if it's enabled.
|
||||
* @param $error
|
||||
*/
|
||||
private function setError($error)
|
||||
{
|
||||
$this->errors[] = $error;
|
||||
if ($this->do_debug >= 1) {
|
||||
echo '<pre>';
|
||||
foreach ($this->errors as $error) {
|
||||
print_r($error);
|
||||
}
|
||||
echo '</pre>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* POP3 connection error handler.
|
||||
* @param integer $errno
|
||||
* @param string $errstr
|
||||
* @param string $errfile
|
||||
* @param integer $errline
|
||||
* @access private
|
||||
*/
|
||||
private function catchWarning($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
$this->setError(array(
|
||||
'error' => "Connecting to the POP3 server raised a PHP warning: ",
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr,
|
||||
'errfile' => $errfile,
|
||||
'errline' => $errline
|
||||
));
|
||||
}
|
||||
}
|
||||
973
mailer/class.smtp.php
Executable file
973
mailer/class.smtp.php
Executable file
@@ -0,0 +1,973 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer RFC821 SMTP email transport class.
|
||||
* PHP Version 5
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2014 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer RFC821 SMTP email transport class.
|
||||
* Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
|
||||
* @package PHPMailer
|
||||
* @author Chris Ryan <unknown@example.com>
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
*/
|
||||
class SMTP
|
||||
{
|
||||
/**
|
||||
* The PHPMailer SMTP version number.
|
||||
* @type string
|
||||
*/
|
||||
const VERSION = '5.2.9';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
* @type string
|
||||
*/
|
||||
const CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* The SMTP port to use if one is not specified.
|
||||
* @type integer
|
||||
*/
|
||||
const DEFAULT_SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* The maximum line length allowed by RFC 2822 section 2.1.1
|
||||
* @type integer
|
||||
*/
|
||||
const MAX_LINE_LENGTH = 998;
|
||||
|
||||
/**
|
||||
* Debug level for no output
|
||||
*/
|
||||
const DEBUG_OFF = 0;
|
||||
|
||||
/**
|
||||
* Debug level to show client -> server messages
|
||||
*/
|
||||
const DEBUG_CLIENT = 1;
|
||||
|
||||
/**
|
||||
* Debug level to show client -> server and server -> client messages
|
||||
*/
|
||||
const DEBUG_SERVER = 2;
|
||||
|
||||
/**
|
||||
* Debug level to show connection status, client -> server and server -> client messages
|
||||
*/
|
||||
const DEBUG_CONNECTION = 3;
|
||||
|
||||
/**
|
||||
* Debug level to show all messages
|
||||
*/
|
||||
const DEBUG_LOWLEVEL = 4;
|
||||
|
||||
/**
|
||||
* The PHPMailer SMTP Version number.
|
||||
* @type string
|
||||
* @deprecated Use the `VERSION` constant instead
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
public $Version = '5.2.9';
|
||||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
* @type integer
|
||||
* @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead
|
||||
* @see SMTP::DEFAULT_SMTP_PORT
|
||||
*/
|
||||
public $SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* SMTP reply line ending.
|
||||
* @type string
|
||||
* @deprecated Use the `CRLF` constant instead
|
||||
* @see SMTP::CRLF
|
||||
*/
|
||||
public $CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* Debug output level.
|
||||
* Options:
|
||||
* * self::DEBUG_OFF (`0`) No debug output, default
|
||||
* * self::DEBUG_CLIENT (`1`) Client commands
|
||||
* * self::DEBUG_SERVER (`2`) Client commands and server responses
|
||||
* * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status
|
||||
* * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages
|
||||
* @type integer
|
||||
*/
|
||||
public $do_debug = self::DEBUG_OFF;
|
||||
|
||||
/**
|
||||
* How to handle debug output.
|
||||
* Options:
|
||||
* * `echo` Output plain-text as-is, appropriate for CLI
|
||||
* * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output
|
||||
* * `error_log` Output to error log as configured in php.ini
|
||||
*
|
||||
* Alternatively, you can provide a callable expecting two params: a message string and the debug level:
|
||||
* <code>
|
||||
* $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
|
||||
* </code>
|
||||
* @type string|callable
|
||||
*/
|
||||
public $Debugoutput = 'echo';
|
||||
|
||||
/**
|
||||
* Whether to use VERP.
|
||||
* @link http://en.wikipedia.org/wiki/Variable_envelope_return_path
|
||||
* @link http://www.postfix.org/VERP_README.html Info on VERP
|
||||
* @type boolean
|
||||
*/
|
||||
public $do_verp = false;
|
||||
|
||||
/**
|
||||
* The timeout value for connection, in seconds.
|
||||
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
|
||||
* This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.
|
||||
* @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2
|
||||
* @type integer
|
||||
*/
|
||||
public $Timeout = 300;
|
||||
|
||||
/**
|
||||
* How long to wait for commands to complete, in seconds.
|
||||
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
|
||||
* @type integer
|
||||
*/
|
||||
public $Timelimit = 300;
|
||||
|
||||
/**
|
||||
* The socket for the server connection.
|
||||
* @type resource
|
||||
*/
|
||||
protected $smtp_conn;
|
||||
|
||||
/**
|
||||
* Error message, if any, for the last call.
|
||||
* @type array
|
||||
*/
|
||||
protected $error = array();
|
||||
|
||||
/**
|
||||
* The reply the server sent to us for HELO.
|
||||
* If null, no HELO string has yet been received.
|
||||
* @type string|null
|
||||
*/
|
||||
protected $helo_rply = null;
|
||||
|
||||
/**
|
||||
* The most recent reply received from the server.
|
||||
* @type string
|
||||
*/
|
||||
protected $last_reply = '';
|
||||
|
||||
/**
|
||||
* Output debugging info via a user-selected method.
|
||||
* @see SMTP::$Debugoutput
|
||||
* @see SMTP::$do_debug
|
||||
* @param string $str Debug string to output
|
||||
* @param integer $level The debug level of this message; see DEBUG_* constants
|
||||
* @return void
|
||||
*/
|
||||
protected function edebug($str, $level = 0)
|
||||
{
|
||||
if ($level > $this->do_debug) {
|
||||
return;
|
||||
}
|
||||
if (is_callable($this->Debugoutput)) {
|
||||
call_user_func($this->Debugoutput, $str, $this->do_debug);
|
||||
return;
|
||||
}
|
||||
switch ($this->Debugoutput) {
|
||||
case 'error_log':
|
||||
//Don't output, just log
|
||||
error_log($str);
|
||||
break;
|
||||
case 'html':
|
||||
//Cleans up output a bit for a better looking, HTML-safe output
|
||||
echo htmlentities(
|
||||
preg_replace('/[\r\n]+/', '', $str),
|
||||
ENT_QUOTES,
|
||||
'UTF-8'
|
||||
)
|
||||
. "<br>\n";
|
||||
break;
|
||||
case 'echo':
|
||||
default:
|
||||
//Normalize line breaks
|
||||
$str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str);
|
||||
echo gmdate('Y-m-d H:i:s') . "\t" . str_replace(
|
||||
"\n",
|
||||
"\n \t ",
|
||||
trim($str)
|
||||
)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to an SMTP server.
|
||||
* @param string $host SMTP server IP or host name
|
||||
* @param integer $port The port number to connect to
|
||||
* @param integer $timeout How long to wait for the connection to open
|
||||
* @param array $options An array of options for stream_context_create()
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function connect($host, $port = null, $timeout = 30, $options = array())
|
||||
{
|
||||
static $streamok;
|
||||
//This is enabled by default since 5.0.0 but some providers disable it
|
||||
//Check this once and cache the result
|
||||
if (is_null($streamok)) {
|
||||
$streamok = function_exists('stream_socket_client');
|
||||
}
|
||||
// Clear errors to avoid confusion
|
||||
$this->error = array();
|
||||
// Make sure we are __not__ connected
|
||||
if ($this->connected()) {
|
||||
// Already connected, generate error
|
||||
$this->error = array('error' => 'Already connected to a server');
|
||||
return false;
|
||||
}
|
||||
if (empty($port)) {
|
||||
$port = self::DEFAULT_SMTP_PORT;
|
||||
}
|
||||
// Connect to the SMTP server
|
||||
$this->edebug(
|
||||
"Connection: opening to $host:$port, t=$timeout, opt=".var_export($options, true),
|
||||
self::DEBUG_CONNECTION
|
||||
);
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
if ($streamok) {
|
||||
$socket_context = stream_context_create($options);
|
||||
//Suppress errors; connection failures are handled at a higher level
|
||||
$this->smtp_conn = @stream_socket_client(
|
||||
$host . ":" . $port,
|
||||
$errno,
|
||||
$errstr,
|
||||
$timeout,
|
||||
STREAM_CLIENT_CONNECT,
|
||||
$socket_context
|
||||
);
|
||||
} else {
|
||||
//Fall back to fsockopen which should work in more places, but is missing some features
|
||||
$this->edebug(
|
||||
"Connection: stream_socket_client not available, falling back to fsockopen",
|
||||
self::DEBUG_CONNECTION
|
||||
);
|
||||
$this->smtp_conn = fsockopen(
|
||||
$host,
|
||||
$port,
|
||||
$errno,
|
||||
$errstr,
|
||||
$timeout
|
||||
);
|
||||
}
|
||||
// Verify we connected properly
|
||||
if (!is_resource($this->smtp_conn)) {
|
||||
$this->error = array(
|
||||
'error' => 'Failed to connect to server',
|
||||
'errno' => $errno,
|
||||
'errstr' => $errstr
|
||||
);
|
||||
$this->edebug(
|
||||
'SMTP ERROR: ' . $this->error['error']
|
||||
. ": $errstr ($errno)",
|
||||
self::DEBUG_CLIENT
|
||||
);
|
||||
return false;
|
||||
}
|
||||
$this->edebug('Connection: opened', self::DEBUG_CONNECTION);
|
||||
// SMTP server can take longer to respond, give longer timeout for first read
|
||||
// Windows does not have support for this timeout function
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
$max = ini_get('max_execution_time');
|
||||
if ($max != 0 && $timeout > $max) { // Don't bother if unlimited
|
||||
@set_time_limit($timeout);
|
||||
}
|
||||
stream_set_timeout($this->smtp_conn, $timeout, 0);
|
||||
}
|
||||
// Get any announcement
|
||||
$announce = $this->get_lines();
|
||||
$this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate a TLS (encrypted) session.
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function startTLS()
|
||||
{
|
||||
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
|
||||
return false;
|
||||
}
|
||||
// Begin encrypted connection
|
||||
if (!stream_socket_enable_crypto(
|
||||
$this->smtp_conn,
|
||||
true,
|
||||
STREAM_CRYPTO_METHOD_TLS_CLIENT
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform SMTP authentication.
|
||||
* Must be run after hello().
|
||||
* @see hello()
|
||||
* @param string $username The user name
|
||||
* @param string $password The password
|
||||
* @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5)
|
||||
* @param string $realm The auth realm for NTLM
|
||||
* @param string $workstation The auth workstation for NTLM
|
||||
* @access public
|
||||
* @return boolean True if successfully authenticated.
|
||||
*/
|
||||
public function authenticate(
|
||||
$username,
|
||||
$password,
|
||||
$authtype = 'LOGIN',
|
||||
$realm = '',
|
||||
$workstation = ''
|
||||
) {
|
||||
if (empty($authtype)) {
|
||||
$authtype = 'LOGIN';
|
||||
}
|
||||
switch ($authtype) {
|
||||
case 'PLAIN':
|
||||
// Start authentication
|
||||
if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) {
|
||||
return false;
|
||||
}
|
||||
// Send encoded username and password
|
||||
if (!$this->sendCommand(
|
||||
'User & Password',
|
||||
base64_encode("\0" . $username . "\0" . $password),
|
||||
235
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'LOGIN':
|
||||
// Start authentication
|
||||
if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->sendCommand("Username", base64_encode($username), 334)) {
|
||||
return false;
|
||||
}
|
||||
if (!$this->sendCommand("Password", base64_encode($password), 235)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'NTLM':
|
||||
/*
|
||||
* ntlm_sasl_client.php
|
||||
* Bundled with Permission
|
||||
*
|
||||
* How to telnet in windows:
|
||||
* http://technet.microsoft.com/en-us/library/aa995718%28EXCHG.65%29.aspx
|
||||
* PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication
|
||||
*/
|
||||
require_once 'extras/ntlm_sasl_client.php';
|
||||
$temp = new stdClass();
|
||||
$ntlm_client = new ntlm_sasl_client_class;
|
||||
//Check that functions are available
|
||||
if (!$ntlm_client->Initialize($temp)) {
|
||||
$this->error = array('error' => $temp->error);
|
||||
$this->edebug(
|
||||
'You need to enable some modules in your php.ini file: '
|
||||
. $this->error['error'],
|
||||
self::DEBUG_CLIENT
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//msg1
|
||||
$msg1 = $ntlm_client->TypeMsg1($realm, $workstation); //msg1
|
||||
|
||||
if (!$this->sendCommand(
|
||||
'AUTH NTLM',
|
||||
'AUTH NTLM ' . base64_encode($msg1),
|
||||
334
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
//Though 0 based, there is a white space after the 3 digit number
|
||||
//msg2
|
||||
$challenge = substr($this->last_reply, 3);
|
||||
$challenge = base64_decode($challenge);
|
||||
$ntlm_res = $ntlm_client->NTLMResponse(
|
||||
substr($challenge, 24, 8),
|
||||
$password
|
||||
);
|
||||
//msg3
|
||||
$msg3 = $ntlm_client->TypeMsg3(
|
||||
$ntlm_res,
|
||||
$username,
|
||||
$realm,
|
||||
$workstation
|
||||
);
|
||||
// send encoded username
|
||||
return $this->sendCommand('Username', base64_encode($msg3), 235);
|
||||
case 'CRAM-MD5':
|
||||
// Start authentication
|
||||
if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) {
|
||||
return false;
|
||||
}
|
||||
// Get the challenge
|
||||
$challenge = base64_decode(substr($this->last_reply, 4));
|
||||
|
||||
// Build the response
|
||||
$response = $username . ' ' . $this->hmac($challenge, $password);
|
||||
|
||||
// send encoded credentials
|
||||
return $this->sendCommand('Username', base64_encode($response), 235);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate an MD5 HMAC hash.
|
||||
* Works like hash_hmac('md5', $data, $key)
|
||||
* in case that function is not available
|
||||
* @param string $data The data to hash
|
||||
* @param string $key The key to hash with
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function hmac($data, $key)
|
||||
{
|
||||
if (function_exists('hash_hmac')) {
|
||||
return hash_hmac('md5', $data, $key);
|
||||
}
|
||||
|
||||
// The following borrowed from
|
||||
// http://php.net/manual/en/function.mhash.php#27225
|
||||
|
||||
// RFC 2104 HMAC implementation for php.
|
||||
// Creates an md5 HMAC.
|
||||
// Eliminates the need to install mhash to compute a HMAC
|
||||
// by Lance Rushing
|
||||
|
||||
$bytelen = 64; // byte length for md5
|
||||
if (strlen($key) > $bytelen) {
|
||||
$key = pack('H*', md5($key));
|
||||
}
|
||||
$key = str_pad($key, $bytelen, chr(0x00));
|
||||
$ipad = str_pad('', $bytelen, chr(0x36));
|
||||
$opad = str_pad('', $bytelen, chr(0x5c));
|
||||
$k_ipad = $key ^ $ipad;
|
||||
$k_opad = $key ^ $opad;
|
||||
|
||||
return md5($k_opad . pack('H*', md5($k_ipad . $data)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check connection state.
|
||||
* @access public
|
||||
* @return boolean True if connected.
|
||||
*/
|
||||
public function connected()
|
||||
{
|
||||
if (is_resource($this->smtp_conn)) {
|
||||
$sock_status = stream_get_meta_data($this->smtp_conn);
|
||||
if ($sock_status['eof']) {
|
||||
// The socket is valid but we are not connected
|
||||
$this->edebug(
|
||||
'SMTP NOTICE: EOF caught while checking if connected',
|
||||
self::DEBUG_CLIENT
|
||||
);
|
||||
$this->close();
|
||||
return false;
|
||||
}
|
||||
return true; // everything looks good
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the socket and clean up the state of the class.
|
||||
* Don't use this function without first trying to use QUIT.
|
||||
* @see quit()
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
$this->error = array();
|
||||
$this->helo_rply = null;
|
||||
if (is_resource($this->smtp_conn)) {
|
||||
// close the connection and cleanup
|
||||
fclose($this->smtp_conn);
|
||||
$this->smtp_conn = null; //Makes for cleaner serialization
|
||||
$this->edebug('Connection: closed', self::DEBUG_CONNECTION);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP DATA command.
|
||||
* Issues a data command and sends the msg_data to the server,
|
||||
* finializing the mail transaction. $msg_data is the message
|
||||
* that is to be send with the headers. Each header needs to be
|
||||
* on a single line followed by a <CRLF> with the message headers
|
||||
* and the message body being separated by and additional <CRLF>.
|
||||
* Implements rfc 821: DATA <CRLF>
|
||||
* @param string $msg_data Message data to send
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function data($msg_data)
|
||||
{
|
||||
//This will use the standard timelimit
|
||||
if (!$this->sendCommand('DATA', 'DATA', 354)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The server is ready to accept data!
|
||||
* According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF)
|
||||
* so we will break the data up into lines by \r and/or \n then if needed we will break each of those into
|
||||
* smaller lines to fit within the limit.
|
||||
* We will also look for lines that start with a '.' and prepend an additional '.'.
|
||||
* NOTE: this does not count towards line-length limit.
|
||||
*/
|
||||
|
||||
// Normalize line breaks before exploding
|
||||
$lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data));
|
||||
|
||||
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
|
||||
* of the first line (':' separated) does not contain a space then it _should_ be a header and we will
|
||||
* process all lines before a blank line as headers.
|
||||
*/
|
||||
|
||||
$field = substr($lines[0], 0, strpos($lines[0], ':'));
|
||||
$in_headers = false;
|
||||
if (!empty($field) && strpos($field, ' ') === false) {
|
||||
$in_headers = true;
|
||||
}
|
||||
|
||||
foreach ($lines as $line) {
|
||||
$lines_out = array();
|
||||
if ($in_headers and $line == '') {
|
||||
$in_headers = false;
|
||||
}
|
||||
//We need to break this line up into several smaller lines
|
||||
//This is a small micro-optimisation: isset($str[$len]) is equivalent to (strlen($str) > $len)
|
||||
while (isset($line[self::MAX_LINE_LENGTH])) {
|
||||
//Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on
|
||||
//so as to avoid breaking in the middle of a word
|
||||
$pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' ');
|
||||
if (!$pos) { //Deliberately matches both false and 0
|
||||
//No nice break found, add a hard break
|
||||
$pos = self::MAX_LINE_LENGTH - 1;
|
||||
$lines_out[] = substr($line, 0, $pos);
|
||||
$line = substr($line, $pos);
|
||||
} else {
|
||||
//Break at the found point
|
||||
$lines_out[] = substr($line, 0, $pos);
|
||||
//Move along by the amount we dealt with
|
||||
$line = substr($line, $pos + 1);
|
||||
}
|
||||
//If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1
|
||||
if ($in_headers) {
|
||||
$line = "\t" . $line;
|
||||
}
|
||||
}
|
||||
$lines_out[] = $line;
|
||||
|
||||
//Send the lines to the server
|
||||
foreach ($lines_out as $line_out) {
|
||||
//RFC2821 section 4.5.2
|
||||
if (!empty($line_out) and $line_out[0] == '.') {
|
||||
$line_out = '.' . $line_out;
|
||||
}
|
||||
$this->client_send($line_out . self::CRLF);
|
||||
}
|
||||
}
|
||||
|
||||
//Message data has been sent, complete the command
|
||||
//Increase timelimit for end of DATA command
|
||||
$savetimelimit = $this->Timelimit;
|
||||
$this->Timelimit = $this->Timelimit * 2;
|
||||
$result = $this->sendCommand('DATA END', '.', 250);
|
||||
//Restore timelimit
|
||||
$this->Timelimit = $savetimelimit;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP HELO or EHLO command.
|
||||
* Used to identify the sending server to the receiving server.
|
||||
* This makes sure that client and server are in a known state.
|
||||
* Implements RFC 821: HELO <SP> <domain> <CRLF>
|
||||
* and RFC 2821 EHLO.
|
||||
* @param string $host The host name or IP to connect to
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function hello($host = '')
|
||||
{
|
||||
//Try extended hello first (RFC 2821)
|
||||
return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP HELO or EHLO command.
|
||||
* Low-level implementation used by hello()
|
||||
* @see hello()
|
||||
* @param string $hello The HELO string
|
||||
* @param string $host The hostname to say we are
|
||||
* @access protected
|
||||
* @return boolean
|
||||
*/
|
||||
protected function sendHello($hello, $host)
|
||||
{
|
||||
$noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
|
||||
$this->helo_rply = $this->last_reply;
|
||||
return $noerror;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP MAIL command.
|
||||
* Starts a mail transaction from the email address specified in
|
||||
* $from. Returns true if successful or false otherwise. If True
|
||||
* the mail transaction is started and then one or more recipient
|
||||
* commands may be called followed by a data command.
|
||||
* Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
|
||||
* @param string $from Source address of this message
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function mail($from)
|
||||
{
|
||||
$useVerp = ($this->do_verp ? ' XVERP' : '');
|
||||
return $this->sendCommand(
|
||||
'MAIL FROM',
|
||||
'MAIL FROM:<' . $from . '>' . $useVerp,
|
||||
250
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP QUIT command.
|
||||
* Closes the socket if there is no error or the $close_on_error argument is true.
|
||||
* Implements from rfc 821: QUIT <CRLF>
|
||||
* @param boolean $close_on_error Should the connection close if an error occurs?
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function quit($close_on_error = true)
|
||||
{
|
||||
$noerror = $this->sendCommand('QUIT', 'QUIT', 221);
|
||||
$err = $this->error; //Save any error
|
||||
if ($noerror or $close_on_error) {
|
||||
$this->close();
|
||||
$this->error = $err; //Restore any error from the quit command
|
||||
}
|
||||
return $noerror;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP RCPT command.
|
||||
* Sets the TO argument to $toaddr.
|
||||
* Returns true if the recipient was accepted false if it was rejected.
|
||||
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
|
||||
* @param string $toaddr The address the message is being sent to
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function recipient($toaddr)
|
||||
{
|
||||
return $this->sendCommand(
|
||||
'RCPT TO',
|
||||
'RCPT TO:<' . $toaddr . '>',
|
||||
array(250, 251)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP RSET command.
|
||||
* Abort any transaction that is currently in progress.
|
||||
* Implements rfc 821: RSET <CRLF>
|
||||
* @access public
|
||||
* @return boolean True on success.
|
||||
*/
|
||||
public function reset()
|
||||
{
|
||||
return $this->sendCommand('RSET', 'RSET', 250);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a command to an SMTP server and check its return code.
|
||||
* @param string $command The command name - not sent to the server
|
||||
* @param string $commandstring The actual command to send
|
||||
* @param integer|array $expect One or more expected integer success codes
|
||||
* @access protected
|
||||
* @return boolean True on success.
|
||||
*/
|
||||
protected function sendCommand($command, $commandstring, $expect)
|
||||
{
|
||||
if (!$this->connected()) {
|
||||
$this->error = array(
|
||||
'error' => "Called $command without being connected"
|
||||
);
|
||||
return false;
|
||||
}
|
||||
$this->client_send($commandstring . self::CRLF);
|
||||
|
||||
$this->last_reply = $this->get_lines();
|
||||
$code = substr($this->last_reply, 0, 3);
|
||||
|
||||
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
|
||||
|
||||
if (!in_array($code, (array)$expect)) {
|
||||
$this->error = array(
|
||||
'error' => "$command command failed",
|
||||
'smtp_code' => $code,
|
||||
'detail' => substr($this->last_reply, 4)
|
||||
);
|
||||
$this->edebug(
|
||||
'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,
|
||||
self::DEBUG_CLIENT
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->error = array();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP SAML command.
|
||||
* Starts a mail transaction from the email address specified in $from.
|
||||
* Returns true if successful or false otherwise. If True
|
||||
* the mail transaction is started and then one or more recipient
|
||||
* commands may be called followed by a data command. This command
|
||||
* will send the message to the users terminal if they are logged
|
||||
* in and send them an email.
|
||||
* Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
|
||||
* @param string $from The address the message is from
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function sendAndMail($from)
|
||||
{
|
||||
return $this->sendCommand('SAML', "SAML FROM:$from", 250);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP VRFY command.
|
||||
* @param string $name The name to verify
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function verify($name)
|
||||
{
|
||||
return $this->sendCommand('VRFY', "VRFY $name", array(250, 251));
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP NOOP command.
|
||||
* Used to keep keep-alives alive, doesn't actually do anything
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function noop()
|
||||
{
|
||||
return $this->sendCommand('NOOP', 'NOOP', 250);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an SMTP TURN command.
|
||||
* This is an optional command for SMTP that this class does not support.
|
||||
* This method is here to make the RFC821 Definition complete for this class
|
||||
* and _may_ be implemented in future
|
||||
* Implements from rfc 821: TURN <CRLF>
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function turn()
|
||||
{
|
||||
$this->error = array(
|
||||
'error' => 'The SMTP TURN command is not implemented'
|
||||
);
|
||||
$this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send raw data to the server.
|
||||
* @param string $data The data to send
|
||||
* @access public
|
||||
* @return integer|boolean The number of bytes sent to the server or false on error
|
||||
*/
|
||||
public function client_send($data)
|
||||
{
|
||||
$this->edebug("CLIENT -> SERVER: $data", self::DEBUG_CLIENT);
|
||||
return fwrite($this->smtp_conn, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the latest error.
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last reply from the server.
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getLastReply()
|
||||
{
|
||||
return $this->last_reply;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the SMTP server's response.
|
||||
* Either before eof or socket timeout occurs on the operation.
|
||||
* With SMTP we can tell if we have more lines to read if the
|
||||
* 4th character is '-' symbol. If it is a space then we don't
|
||||
* need to read anything else.
|
||||
* @access protected
|
||||
* @return string
|
||||
*/
|
||||
protected function get_lines()
|
||||
{
|
||||
// If the connection is bad, give up straight away
|
||||
if (!is_resource($this->smtp_conn)) {
|
||||
return '';
|
||||
}
|
||||
$data = '';
|
||||
$endtime = 0;
|
||||
stream_set_timeout($this->smtp_conn, $this->Timeout);
|
||||
if ($this->Timelimit > 0) {
|
||||
$endtime = time() + $this->Timelimit;
|
||||
}
|
||||
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
|
||||
$str = @fgets($this->smtp_conn, 515);
|
||||
$this->edebug("SMTP -> get_lines(): \$data was \"$data\"", self::DEBUG_LOWLEVEL);
|
||||
$this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
|
||||
$data .= $str;
|
||||
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
|
||||
// If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen
|
||||
if ((isset($str[3]) and $str[3] == ' ')) {
|
||||
break;
|
||||
}
|
||||
// Timed-out? Log and break
|
||||
$info = stream_get_meta_data($this->smtp_conn);
|
||||
if ($info['timed_out']) {
|
||||
$this->edebug(
|
||||
'SMTP -> get_lines(): timed-out (' . $this->Timeout . ' sec)',
|
||||
self::DEBUG_LOWLEVEL
|
||||
);
|
||||
break;
|
||||
}
|
||||
// Now check if reads took too long
|
||||
if ($endtime and time() > $endtime) {
|
||||
$this->edebug(
|
||||
'SMTP -> get_lines(): timelimit reached ('.
|
||||
$this->Timelimit . ' sec)',
|
||||
self::DEBUG_LOWLEVEL
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable VERP address generation.
|
||||
* @param boolean $enabled
|
||||
*/
|
||||
public function setVerp($enabled = false)
|
||||
{
|
||||
$this->do_verp = $enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get VERP address generation mode.
|
||||
* @return boolean
|
||||
*/
|
||||
public function getVerp()
|
||||
{
|
||||
return $this->do_verp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set debug output method.
|
||||
* @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it.
|
||||
*/
|
||||
public function setDebugOutput($method = 'echo')
|
||||
{
|
||||
$this->Debugoutput = $method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get debug output method.
|
||||
* @return string
|
||||
*/
|
||||
public function getDebugOutput()
|
||||
{
|
||||
return $this->Debugoutput;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set debug output level.
|
||||
* @param integer $level
|
||||
*/
|
||||
public function setDebugLevel($level = 0)
|
||||
{
|
||||
$this->do_debug = $level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get debug output level.
|
||||
* @return integer
|
||||
*/
|
||||
public function getDebugLevel()
|
||||
{
|
||||
return $this->do_debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set SMTP timeout.
|
||||
* @param integer $timeout
|
||||
*/
|
||||
public function setTimeout($timeout = 0)
|
||||
{
|
||||
$this->Timeout = $timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get SMTP timeout.
|
||||
* @return integer
|
||||
*/
|
||||
public function getTimeout()
|
||||
{
|
||||
return $this->Timeout;
|
||||
}
|
||||
}
|
||||
90
mailer/extras/EasyPeasyICS.php
Executable file
90
mailer/extras/EasyPeasyICS.php
Executable file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* EasyPeasyICS
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Manuel Reinhard, manu@sprain.ch
|
||||
/* Twitter: @sprain
|
||||
/* Web: www.sprain.ch
|
||||
/*
|
||||
/* Built with inspiration by
|
||||
/" http://stackoverflow.com/questions/1463480/how-can-i-use-php-to-dynamically-publish-an-ical-file-to-be-read-by-google-calend/1464355#1464355
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* History:
|
||||
/* 2010/12/17 - Manuel Reinhard - when it all started
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
class EasyPeasyICS {
|
||||
|
||||
protected $calendarName;
|
||||
protected $events = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $calendarName
|
||||
*/
|
||||
public function __construct($calendarName=""){
|
||||
$this->calendarName = $calendarName;
|
||||
}//function
|
||||
|
||||
|
||||
/**
|
||||
* Add event to calendar
|
||||
* @param string $calendarName
|
||||
*/
|
||||
public function addEvent($start, $end, $summary="", $description="", $url=""){
|
||||
$this->events[] = array(
|
||||
"start" => $start,
|
||||
"end" => $end,
|
||||
"summary" => $summary,
|
||||
"description" => $description,
|
||||
"url" => $url
|
||||
);
|
||||
}//function
|
||||
|
||||
|
||||
public function render($output = true){
|
||||
|
||||
//start Variable
|
||||
$ics = "";
|
||||
|
||||
//Add header
|
||||
$ics .= "BEGIN:VCALENDAR
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
X-WR-CALNAME:".$this->calendarName."
|
||||
PRODID:-//hacksw/handcal//NONSGML v1.0//EN";
|
||||
|
||||
//Add events
|
||||
foreach($this->events as $event){
|
||||
$ics .= "
|
||||
BEGIN:VEVENT
|
||||
UID:". md5(uniqid(mt_rand(), true)) ."@EasyPeasyICS.php
|
||||
DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z
|
||||
DTSTART:".gmdate('Ymd', $event["start"])."T".gmdate('His', $event["start"])."Z
|
||||
DTEND:".gmdate('Ymd', $event["end"])."T".gmdate('His', $event["end"])."Z
|
||||
SUMMARY:".str_replace("\n", "\\n", $event['summary'])."
|
||||
DESCRIPTION:".str_replace("\n", "\\n", $event['description'])."
|
||||
URL;VALUE=URI:".$event['url']."
|
||||
END:VEVENT";
|
||||
}//foreach
|
||||
|
||||
|
||||
//Footer
|
||||
$ics .= "
|
||||
END:VCALENDAR";
|
||||
|
||||
|
||||
if ($output) {
|
||||
//Output
|
||||
header('Content-type: text/calendar; charset=utf-8');
|
||||
header('Content-Disposition: inline; filename='.$this->calendarName.'.ics');
|
||||
echo $ics;
|
||||
} else {
|
||||
return $ics;
|
||||
}
|
||||
|
||||
}//function
|
||||
|
||||
}//class
|
||||
677
mailer/extras/class.html2text.php
Executable file
677
mailer/extras/class.html2text.php
Executable file
@@ -0,0 +1,677 @@
|
||||
<?php
|
||||
/*************************************************************************
|
||||
* *
|
||||
* Converts HTML to formatted plain text *
|
||||
* *
|
||||
* Portions Copyright (c) 2005-2007 Jon Abernathy <jon@chuggnutt.com> *
|
||||
* *
|
||||
* This script is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* The GNU General Public License can be found at *
|
||||
* http://www.gnu.org/copyleft/gpl.html. *
|
||||
* *
|
||||
* This script is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/**
|
||||
* Converts HTML to formatted plain text
|
||||
*/
|
||||
class Html2Text
|
||||
{
|
||||
/**
|
||||
* Contains the HTML content to convert.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $html;
|
||||
|
||||
/**
|
||||
* Contains the converted, formatted text.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $text;
|
||||
|
||||
/**
|
||||
* Maximum width of the formatted text, in columns.
|
||||
*
|
||||
* Set this value to 0 (or less) to ignore word wrapping
|
||||
* and not constrain text to a fixed-width column.
|
||||
*
|
||||
* @type integer
|
||||
*/
|
||||
protected $width = 70;
|
||||
|
||||
/**
|
||||
* List of preg* regular expression patterns to search for,
|
||||
* used in conjunction with $replace.
|
||||
*
|
||||
* @type array
|
||||
* @see $replace
|
||||
*/
|
||||
protected $search = array(
|
||||
"/\r/", // Non-legal carriage return
|
||||
"/[\n\t]+/", // Newlines and tabs
|
||||
'/<head[^>]*>.*?<\/head>/i', // <head>
|
||||
'/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with
|
||||
'/<style[^>]*>.*?<\/style>/i', // <style>s -- which strip_tags supposedly has problems with
|
||||
'/<p[^>]*>/i', // <P>
|
||||
'/<br[^>]*>/i', // <br>
|
||||
'/<i[^>]*>(.*?)<\/i>/i', // <i>
|
||||
'/<em[^>]*>(.*?)<\/em>/i', // <em>
|
||||
'/(<ul[^>]*>|<\/ul>)/i', // <ul> and </ul>
|
||||
'/(<ol[^>]*>|<\/ol>)/i', // <ol> and </ol>
|
||||
'/(<dl[^>]*>|<\/dl>)/i', // <dl> and </dl>
|
||||
'/<li[^>]*>(.*?)<\/li>/i', // <li> and </li>
|
||||
'/<dd[^>]*>(.*?)<\/dd>/i', // <dd> and </dd>
|
||||
'/<dt[^>]*>(.*?)<\/dt>/i', // <dt> and </dt>
|
||||
'/<li[^>]*>/i', // <li>
|
||||
'/<hr[^>]*>/i', // <hr>
|
||||
'/<div[^>]*>/i', // <div>
|
||||
'/(<table[^>]*>|<\/table>)/i', // <table> and </table>
|
||||
'/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr>
|
||||
'/<td[^>]*>(.*?)<\/td>/i', // <td> and </td>
|
||||
'/<span class="_html2text_ignore">.+?<\/span>/i' // <span class="_html2text_ignore">...</span>
|
||||
);
|
||||
|
||||
/**
|
||||
* List of pattern replacements corresponding to patterns searched.
|
||||
*
|
||||
* @type array
|
||||
* @see $search
|
||||
*/
|
||||
protected $replace = array(
|
||||
'', // Non-legal carriage return
|
||||
' ', // Newlines and tabs
|
||||
'', // <head>
|
||||
'', // <script>s -- which strip_tags supposedly has problems with
|
||||
'', // <style>s -- which strip_tags supposedly has problems with
|
||||
"\n\n", // <P>
|
||||
"\n", // <br>
|
||||
'_\\1_', // <i>
|
||||
'_\\1_', // <em>
|
||||
"\n\n", // <ul> and </ul>
|
||||
"\n\n", // <ol> and </ol>
|
||||
"\n\n", // <dl> and </dl>
|
||||
"\t* \\1\n", // <li> and </li>
|
||||
" \\1\n", // <dd> and </dd>
|
||||
"\t* \\1", // <dt> and </dt>
|
||||
"\n\t* ", // <li>
|
||||
"\n-------------------------\n", // <hr>
|
||||
"<div>\n", // <div>
|
||||
"\n\n", // <table> and </table>
|
||||
"\n", // <tr> and </tr>
|
||||
"\t\t\\1\n", // <td> and </td>
|
||||
"" // <span class="_html2text_ignore">...</span>
|
||||
);
|
||||
|
||||
/**
|
||||
* List of preg* regular expression patterns to search for,
|
||||
* used in conjunction with $ent_replace.
|
||||
*
|
||||
* @type array
|
||||
* @see $ent_replace
|
||||
*/
|
||||
protected $ent_search = array(
|
||||
'/&(nbsp|#160);/i', // Non-breaking space
|
||||
'/&(quot|rdquo|ldquo|#8220|#8221|#147|#148);/i',
|
||||
// Double quotes
|
||||
'/&(apos|rsquo|lsquo|#8216|#8217);/i', // Single quotes
|
||||
'/>/i', // Greater-than
|
||||
'/</i', // Less-than
|
||||
'/&(copy|#169);/i', // Copyright
|
||||
'/&(trade|#8482|#153);/i', // Trademark
|
||||
'/&(reg|#174);/i', // Registered
|
||||
'/&(mdash|#151|#8212);/i', // mdash
|
||||
'/&(ndash|minus|#8211|#8722);/i', // ndash
|
||||
'/&(bull|#149|#8226);/i', // Bullet
|
||||
'/&(pound|#163);/i', // Pound sign
|
||||
'/&(euro|#8364);/i', // Euro sign
|
||||
'/&(amp|#38);/i', // Ampersand: see _converter()
|
||||
'/[ ]{2,}/', // Runs of spaces, post-handling
|
||||
);
|
||||
|
||||
/**
|
||||
* List of pattern replacements corresponding to patterns searched.
|
||||
*
|
||||
* @type array
|
||||
* @see $ent_search
|
||||
*/
|
||||
protected $ent_replace = array(
|
||||
' ', // Non-breaking space
|
||||
'"', // Double quotes
|
||||
"'", // Single quotes
|
||||
'>',
|
||||
'<',
|
||||
'(c)',
|
||||
'(tm)',
|
||||
'(R)',
|
||||
'--',
|
||||
'-',
|
||||
'*',
|
||||
'£',
|
||||
'EUR', // Euro sign. € ?
|
||||
'|+|amp|+|', // Ampersand: see _converter()
|
||||
' ', // Runs of spaces, post-handling
|
||||
);
|
||||
|
||||
/**
|
||||
* List of preg* regular expression patterns to search for
|
||||
* and replace using callback function.
|
||||
*
|
||||
* @type array
|
||||
*/
|
||||
protected $callback_search = array(
|
||||
'/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i', // <a href="">
|
||||
'/<(h)[123456]( [^>]*)?>(.*?)<\/h[123456]>/i', // h1 - h6
|
||||
'/<(b)( [^>]*)?>(.*?)<\/b>/i', // <b>
|
||||
'/<(strong)( [^>]*)?>(.*?)<\/strong>/i', // <strong>
|
||||
'/<(th)( [^>]*)?>(.*?)<\/th>/i', // <th> and </th>
|
||||
);
|
||||
|
||||
/**
|
||||
* List of preg* regular expression patterns to search for in PRE body,
|
||||
* used in conjunction with $pre_replace.
|
||||
*
|
||||
* @type array
|
||||
* @see $pre_replace
|
||||
*/
|
||||
protected $pre_search = array(
|
||||
"/\n/",
|
||||
"/\t/",
|
||||
'/ /',
|
||||
'/<pre[^>]*>/',
|
||||
'/<\/pre>/'
|
||||
);
|
||||
|
||||
/**
|
||||
* List of pattern replacements corresponding to patterns searched for PRE body.
|
||||
*
|
||||
* @type array
|
||||
* @see $pre_search
|
||||
*/
|
||||
protected $pre_replace = array(
|
||||
'<br>',
|
||||
' ',
|
||||
' ',
|
||||
'',
|
||||
''
|
||||
);
|
||||
|
||||
/**
|
||||
* Temporary workspace used during PRE processing.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $pre_content = '';
|
||||
|
||||
/**
|
||||
* Contains a list of HTML tags to allow in the resulting text.
|
||||
*
|
||||
* @type string
|
||||
* @see set_allowed_tags()
|
||||
*/
|
||||
protected $allowed_tags = '';
|
||||
|
||||
/**
|
||||
* Contains the base URL that relative links should resolve to.
|
||||
*
|
||||
* @type string
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* Indicates whether content in the $html variable has been converted yet.
|
||||
*
|
||||
* @type boolean
|
||||
* @see $html, $text
|
||||
*/
|
||||
protected $_converted = false;
|
||||
|
||||
/**
|
||||
* Contains URL addresses from links to be rendered in plain text.
|
||||
*
|
||||
* @type array
|
||||
* @see _build_link_list()
|
||||
*/
|
||||
protected $_link_list = array();
|
||||
|
||||
/**
|
||||
* Various configuration options (able to be set in the constructor)
|
||||
*
|
||||
* @type array
|
||||
*/
|
||||
protected $_options = array(
|
||||
// 'none'
|
||||
// 'inline' (show links inline)
|
||||
// 'nextline' (show links on the next line)
|
||||
// 'table' (if a table of link URLs should be listed after the text.
|
||||
'do_links' => 'inline',
|
||||
// Maximum width of the formatted text, in columns.
|
||||
// Set this value to 0 (or less) to ignore word wrapping
|
||||
// and not constrain text to a fixed-width column.
|
||||
'width' => 70,
|
||||
);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* If the HTML source string (or file) is supplied, the class
|
||||
* will instantiate with that source propagated, all that has
|
||||
* to be done it to call get_text().
|
||||
*
|
||||
* @param string $source HTML content
|
||||
* @param boolean $from_file Indicates $source is a file to pull content from
|
||||
* @param array $options Set configuration options
|
||||
*/
|
||||
public function __construct($source = '', $from_file = false, $options = array())
|
||||
{
|
||||
$this->_options = array_merge($this->_options, $options);
|
||||
|
||||
if (!empty($source)) {
|
||||
$this->set_html($source, $from_file);
|
||||
}
|
||||
|
||||
$this->set_base_url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads source HTML into memory, either from $source string or a file.
|
||||
*
|
||||
* @param string $source HTML content
|
||||
* @param boolean $from_file Indicates $source is a file to pull content from
|
||||
*/
|
||||
public function set_html($source, $from_file = false)
|
||||
{
|
||||
if ($from_file && file_exists($source)) {
|
||||
$this->html = file_get_contents($source);
|
||||
} else {
|
||||
$this->html = $source;
|
||||
}
|
||||
|
||||
$this->_converted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the text, converted from HTML.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_text()
|
||||
{
|
||||
if (!$this->_converted) {
|
||||
$this->_convert();
|
||||
}
|
||||
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the text, converted from HTML.
|
||||
*/
|
||||
public function print_text()
|
||||
{
|
||||
print $this->get_text();
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias to print_text(), operates identically.
|
||||
*
|
||||
* @see print_text()
|
||||
*/
|
||||
public function p()
|
||||
{
|
||||
print $this->get_text();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the allowed HTML tags to pass through to the resulting text.
|
||||
*
|
||||
* Tags should be in the form "<p>", with no corresponding closing tag.
|
||||
* @param string $allowed_tags
|
||||
*/
|
||||
public function set_allowed_tags($allowed_tags = '')
|
||||
{
|
||||
if (!empty($allowed_tags)) {
|
||||
$this->allowed_tags = $allowed_tags;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a base URL to handle relative links.
|
||||
*
|
||||
* @param string $url
|
||||
*/
|
||||
public function set_base_url($url = '')
|
||||
{
|
||||
if (empty($url)) {
|
||||
if (!empty($_SERVER['HTTP_HOST'])) {
|
||||
$this->url = 'http://' . $_SERVER['HTTP_HOST'];
|
||||
} else {
|
||||
$this->url = '';
|
||||
}
|
||||
} else {
|
||||
// Strip any trailing slashes for consistency (relative
|
||||
// URLs may already start with a slash like "/file.html")
|
||||
if (substr($url, -1) == '/') {
|
||||
$url = substr($url, 0, -1);
|
||||
}
|
||||
$this->url = $url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Workhorse function that does actual conversion (calls _converter() method).
|
||||
*/
|
||||
protected function _convert()
|
||||
{
|
||||
// Variables used for building the link list
|
||||
$this->_link_list = array();
|
||||
|
||||
$text = trim(stripslashes($this->html));
|
||||
|
||||
// Convert HTML to TXT
|
||||
$this->_converter($text);
|
||||
|
||||
// Add link list
|
||||
if (!empty($this->_link_list)) {
|
||||
$text .= "\n\nLinks:\n------\n";
|
||||
foreach ($this->_link_list as $idx => $url) {
|
||||
$text .= '[' . ($idx + 1) . '] ' . $url . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$this->text = $text;
|
||||
|
||||
$this->_converted = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Workhorse function that does actual conversion.
|
||||
*
|
||||
* First performs custom tag replacement specified by $search and
|
||||
* $replace arrays. Then strips any remaining HTML tags, reduces whitespace
|
||||
* and newlines to a readable format, and word wraps the text to
|
||||
* $this->_options['width'] characters.
|
||||
*
|
||||
* @param string $text Reference to HTML content string
|
||||
*/
|
||||
protected function _converter(&$text)
|
||||
{
|
||||
// Convert <BLOCKQUOTE> (before PRE!)
|
||||
$this->_convert_blockquotes($text);
|
||||
|
||||
// Convert <PRE>
|
||||
$this->_convert_pre($text);
|
||||
|
||||
// Run our defined tags search-and-replace
|
||||
$text = preg_replace($this->search, $this->replace, $text);
|
||||
|
||||
// Run our defined tags search-and-replace with callback
|
||||
$text = preg_replace_callback($this->callback_search, array($this, '_preg_callback'), $text);
|
||||
|
||||
// Strip any other HTML tags
|
||||
$text = strip_tags($text, $this->allowed_tags);
|
||||
|
||||
// Run our defined entities/characters search-and-replace
|
||||
$text = preg_replace($this->ent_search, $this->ent_replace, $text);
|
||||
|
||||
// Replace known html entities
|
||||
$text = html_entity_decode($text, ENT_QUOTES);
|
||||
|
||||
// Remove unknown/unhandled entities (this cannot be done in search-and-replace block)
|
||||
$text = preg_replace('/&([a-zA-Z0-9]{2,6}|#[0-9]{2,4});/', '', $text);
|
||||
|
||||
// Convert "|+|amp|+|" into "&", need to be done after handling of unknown entities
|
||||
// This properly handles situation of "&quot;" in input string
|
||||
$text = str_replace('|+|amp|+|', '&', $text);
|
||||
|
||||
// Bring down number of empty lines to 2 max
|
||||
$text = preg_replace("/\n\s+\n/", "\n\n", $text);
|
||||
$text = preg_replace("/[\n]{3,}/", "\n\n", $text);
|
||||
|
||||
// remove leading empty lines (can be produced by eg. P tag on the beginning)
|
||||
$text = ltrim($text, "\n");
|
||||
|
||||
// Wrap the text to a readable format
|
||||
// for PHP versions >= 4.0.2. Default width is 75
|
||||
// If width is 0 or less, don't wrap the text.
|
||||
if ($this->_options['width'] > 0) {
|
||||
$text = wordwrap($text, $this->_options['width']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function called by preg_replace() on link replacement.
|
||||
*
|
||||
* Maintains an internal list of links to be displayed at the end of the
|
||||
* text, with numeric indices to the original point in the text they
|
||||
* appeared. Also makes an effort at identifying and handling absolute
|
||||
* and relative links.
|
||||
*
|
||||
* @param string $link URL of the link
|
||||
* @param string $display Part of the text to associate number with
|
||||
* @param null $link_override
|
||||
* @return string
|
||||
*/
|
||||
protected function _build_link_list($link, $display, $link_override = null)
|
||||
{
|
||||
$link_method = ($link_override) ? $link_override : $this->_options['do_links'];
|
||||
if ($link_method == 'none') {
|
||||
return $display;
|
||||
}
|
||||
|
||||
|
||||
// Ignored link types
|
||||
if (preg_match('!^(javascript:|mailto:|#)!i', $link)) {
|
||||
return $display;
|
||||
}
|
||||
|
||||
if (preg_match('!^([a-z][a-z0-9.+-]+:)!i', $link)) {
|
||||
$url = $link;
|
||||
} else {
|
||||
$url = $this->url;
|
||||
if (substr($link, 0, 1) != '/') {
|
||||
$url .= '/';
|
||||
}
|
||||
$url .= "$link";
|
||||
}
|
||||
|
||||
if ($link_method == 'table') {
|
||||
if (($index = array_search($url, $this->_link_list)) === false) {
|
||||
$index = count($this->_link_list);
|
||||
$this->_link_list[] = $url;
|
||||
}
|
||||
|
||||
return $display . ' [' . ($index + 1) . ']';
|
||||
} elseif ($link_method == 'nextline') {
|
||||
return $display . "\n[" . $url . ']';
|
||||
} else { // link_method defaults to inline
|
||||
|
||||
return $display . ' [' . $url . ']';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for PRE body conversion.
|
||||
*
|
||||
* @param string $text HTML content
|
||||
*/
|
||||
protected function _convert_pre(&$text)
|
||||
{
|
||||
// get the content of PRE element
|
||||
while (preg_match('/<pre[^>]*>(.*)<\/pre>/ismU', $text, $matches)) {
|
||||
$this->pre_content = $matches[1];
|
||||
|
||||
// Run our defined tags search-and-replace with callback
|
||||
$this->pre_content = preg_replace_callback(
|
||||
$this->callback_search,
|
||||
array($this, '_preg_callback'),
|
||||
$this->pre_content
|
||||
);
|
||||
|
||||
// convert the content
|
||||
$this->pre_content = sprintf(
|
||||
'<div><br>%s<br></div>',
|
||||
preg_replace($this->pre_search, $this->pre_replace, $this->pre_content)
|
||||
);
|
||||
|
||||
// replace the content (use callback because content can contain $0 variable)
|
||||
$text = preg_replace_callback(
|
||||
'/<pre[^>]*>.*<\/pre>/ismU',
|
||||
array($this, '_preg_pre_callback'),
|
||||
$text,
|
||||
1
|
||||
);
|
||||
|
||||
// free memory
|
||||
$this->pre_content = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for BLOCKQUOTE body conversion.
|
||||
*
|
||||
* @param string $text HTML content
|
||||
*/
|
||||
protected function _convert_blockquotes(&$text)
|
||||
{
|
||||
if (preg_match_all('/<\/*blockquote[^>]*>/i', $text, $matches, PREG_OFFSET_CAPTURE)) {
|
||||
$start = 0;
|
||||
$taglen = 0;
|
||||
$level = 0;
|
||||
$diff = 0;
|
||||
foreach ($matches[0] as $m) {
|
||||
if ($m[0][0] == '<' && $m[0][1] == '/') {
|
||||
$level--;
|
||||
if ($level < 0) {
|
||||
$level = 0; // malformed HTML: go to next blockquote
|
||||
} elseif ($level > 0) {
|
||||
// skip inner blockquote
|
||||
} else {
|
||||
$end = $m[1];
|
||||
$len = $end - $taglen - $start;
|
||||
// Get blockquote content
|
||||
$body = substr($text, $start + $taglen - $diff, $len);
|
||||
|
||||
// Set text width
|
||||
$p_width = $this->_options['width'];
|
||||
if ($this->_options['width'] > 0) $this->_options['width'] -= 2;
|
||||
// Convert blockquote content
|
||||
$body = trim($body);
|
||||
$this->_converter($body);
|
||||
// Add citation markers and create PRE block
|
||||
$body = preg_replace('/((^|\n)>*)/', '\\1> ', trim($body));
|
||||
$body = '<pre>' . htmlspecialchars($body) . '</pre>';
|
||||
// Re-set text width
|
||||
$this->_options['width'] = $p_width;
|
||||
// Replace content
|
||||
$text = substr($text, 0, $start - $diff)
|
||||
. $body . substr($text, $end + strlen($m[0]) - $diff);
|
||||
|
||||
$diff = $len + $taglen + strlen($m[0]) - strlen($body);
|
||||
unset($body);
|
||||
}
|
||||
} else {
|
||||
if ($level == 0) {
|
||||
$start = $m[1];
|
||||
$taglen = strlen($m[0]);
|
||||
}
|
||||
$level++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function for preg_replace_callback use.
|
||||
*
|
||||
* @param array $matches PREG matches
|
||||
* @return string
|
||||
*/
|
||||
protected function _preg_callback($matches)
|
||||
{
|
||||
switch (strtolower($matches[1])) {
|
||||
case 'b':
|
||||
case 'strong':
|
||||
return $this->_toupper($matches[3]);
|
||||
case 'th':
|
||||
return $this->_toupper("\t\t" . $matches[3] . "\n");
|
||||
case 'h':
|
||||
return $this->_toupper("\n\n" . $matches[3] . "\n\n");
|
||||
case 'a':
|
||||
// override the link method
|
||||
$link_override = null;
|
||||
if (preg_match('/_html2text_link_(\w+)/', $matches[4], $link_override_match)) {
|
||||
$link_override = $link_override_match[1];
|
||||
}
|
||||
// Remove spaces in URL (#1487805)
|
||||
$url = str_replace(' ', '', $matches[3]);
|
||||
|
||||
return $this->_build_link_list($url, $matches[5], $link_override);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function for preg_replace_callback use in PRE content handler.
|
||||
*
|
||||
* @param array $matches PREG matches
|
||||
* @return string
|
||||
*/
|
||||
protected function _preg_pre_callback(
|
||||
/** @noinspection PhpUnusedParameterInspection */
|
||||
$matches)
|
||||
{
|
||||
return $this->pre_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strtoupper function with HTML tags and entities handling.
|
||||
*
|
||||
* @param string $str Text to convert
|
||||
* @return string Converted text
|
||||
*/
|
||||
private function _toupper($str)
|
||||
{
|
||||
// string can contain HTML tags
|
||||
$chunks = preg_split('/(<[^>]*>)/', $str, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
// convert toupper only the text between HTML tags
|
||||
foreach ($chunks as $idx => $chunk) {
|
||||
if ($chunk[0] != '<') {
|
||||
$chunks[$idx] = $this->_strtoupper($chunk);
|
||||
}
|
||||
}
|
||||
|
||||
return implode($chunks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Strtoupper multibyte wrapper function with HTML entities handling.
|
||||
* Forces mb_strtoupper-call to UTF-8.
|
||||
*
|
||||
* @param string $str Text to convert
|
||||
* @return string Converted text
|
||||
*/
|
||||
private function _strtoupper($str)
|
||||
{
|
||||
$str = html_entity_decode($str, ENT_COMPAT);
|
||||
|
||||
if (function_exists('mb_strtoupper'))
|
||||
$str = mb_strtoupper($str, 'UTF-8');
|
||||
else
|
||||
$str = strtoupper($str);
|
||||
|
||||
$str = htmlspecialchars($str, ENT_COMPAT);
|
||||
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
874
mailer/extras/htmlfilter.php
Executable file
874
mailer/extras/htmlfilter.php
Executable file
@@ -0,0 +1,874 @@
|
||||
<?php
|
||||
/**
|
||||
* htmlfilter.inc
|
||||
* ---------------
|
||||
* This set of functions allows you to filter html in order to remove
|
||||
* any malicious tags from it. Useful in cases when you need to filter
|
||||
* user input for any cross-site-scripting attempts.
|
||||
*
|
||||
* Copyright (C) 2002-2004 by Duke University
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
* @Author Konstantin Riabitsev <icon@linux.duke.edu>
|
||||
* @Author Jim Jagielski <jim@jaguNET.com / jimjag@gmail.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function returns the final tag out of the tag name, an array
|
||||
* of attributes, and the type of the tag. This function is called by
|
||||
* tln_sanitize internally.
|
||||
*
|
||||
* @param string $tagname the name of the tag.
|
||||
* @param array $attary the array of attributes and their values
|
||||
* @param integer $tagtype The type of the tag (see in comments).
|
||||
* @return string A string with the final tag representation.
|
||||
*/
|
||||
function tln_tagprint($tagname, $attary, $tagtype)
|
||||
{
|
||||
if ($tagtype == 2) {
|
||||
$fulltag = '</' . $tagname . '>';
|
||||
} else {
|
||||
$fulltag = '<' . $tagname;
|
||||
if (is_array($attary) && sizeof($attary)) {
|
||||
$atts = array();
|
||||
while (list($attname, $attvalue) = each($attary)) {
|
||||
array_push($atts, "$attname=$attvalue");
|
||||
}
|
||||
$fulltag .= ' ' . join(' ', $atts);
|
||||
}
|
||||
if ($tagtype == 3) {
|
||||
$fulltag .= ' /';
|
||||
}
|
||||
$fulltag .= '>';
|
||||
}
|
||||
return $fulltag;
|
||||
}
|
||||
|
||||
/**
|
||||
* A small helper function to use with array_walk. Modifies a by-ref
|
||||
* value and makes it lowercase.
|
||||
*
|
||||
* @param string $val a value passed by-ref.
|
||||
* @return void since it modifies a by-ref value.
|
||||
*/
|
||||
function tln_casenormalize(&$val)
|
||||
{
|
||||
$val = strtolower($val);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function skips any whitespace from the current position within
|
||||
* a string and to the next non-whitespace value.
|
||||
*
|
||||
* @param string $body the string
|
||||
* @param integer $offset the offset within the string where we should start
|
||||
* looking for the next non-whitespace character.
|
||||
* @return integer the location within the $body where the next
|
||||
* non-whitespace char is located.
|
||||
*/
|
||||
function tln_skipspace($body, $offset)
|
||||
{
|
||||
preg_match('/^(\s*)/s', substr($body, $offset), $matches);
|
||||
if (sizeof($matches[1])) {
|
||||
$count = strlen($matches[1]);
|
||||
$offset += $count;
|
||||
}
|
||||
return $offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function looks for the next character within a string. It's
|
||||
* really just a glorified "strpos", except it catches the failures
|
||||
* nicely.
|
||||
*
|
||||
* @param string $body The string to look for needle in.
|
||||
* @param integer $offset Start looking from this position.
|
||||
* @param string $needle The character/string to look for.
|
||||
* @return integer location of the next occurrence of the needle, or
|
||||
* strlen($body) if needle wasn't found.
|
||||
*/
|
||||
function tln_findnxstr($body, $offset, $needle)
|
||||
{
|
||||
$pos = strpos($body, $needle, $offset);
|
||||
if ($pos === false) {
|
||||
$pos = strlen($body);
|
||||
}
|
||||
return $pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function takes a PCRE-style regexp and tries to match it
|
||||
* within the string.
|
||||
*
|
||||
* @param string $body The string to look for needle in.
|
||||
* @param integer $offset Start looking from here.
|
||||
* @param string $reg A PCRE-style regex to match.
|
||||
* @return array|boolean Returns a false if no matches found, or an array
|
||||
* with the following members:
|
||||
* - integer with the location of the match within $body
|
||||
* - string with whatever content between offset and the match
|
||||
* - string with whatever it is we matched
|
||||
*/
|
||||
function tln_findnxreg($body, $offset, $reg)
|
||||
{
|
||||
$matches = array();
|
||||
$retarr = array();
|
||||
$preg_rule = '%^(.*?)(' . $reg . ')%s';
|
||||
preg_match($preg_rule, substr($body, $offset), $matches);
|
||||
if (!isset($matches[0])) {
|
||||
$retarr = false;
|
||||
} else {
|
||||
$retarr[0] = $offset + strlen($matches[1]);
|
||||
$retarr[1] = $matches[1];
|
||||
$retarr[2] = $matches[2];
|
||||
}
|
||||
return $retarr;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function looks for the next tag.
|
||||
*
|
||||
* @param string $body String where to look for the next tag.
|
||||
* @param integer $offset Start looking from here.
|
||||
* @return array|boolean false if no more tags exist in the body, or
|
||||
* an array with the following members:
|
||||
* - string with the name of the tag
|
||||
* - array with attributes and their values
|
||||
* - integer with tag type (1, 2, or 3)
|
||||
* - integer where the tag starts (starting "<")
|
||||
* - integer where the tag ends (ending ">")
|
||||
* first three members will be false, if the tag is invalid.
|
||||
*/
|
||||
function tln_getnxtag($body, $offset)
|
||||
{
|
||||
if ($offset > strlen($body)) {
|
||||
return false;
|
||||
}
|
||||
$lt = tln_findnxstr($body, $offset, '<');
|
||||
if ($lt == strlen($body)) {
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* We are here:
|
||||
* blah blah <tag attribute="value">
|
||||
* \---------^
|
||||
*/
|
||||
$pos = tln_skipspace($body, $lt + 1);
|
||||
if ($pos >= strlen($body)) {
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
/**
|
||||
* There are 3 kinds of tags:
|
||||
* 1. Opening tag, e.g.:
|
||||
* <a href="blah">
|
||||
* 2. Closing tag, e.g.:
|
||||
* </a>
|
||||
* 3. XHTML-style content-less tag, e.g.:
|
||||
* <img src="blah"/>
|
||||
*/
|
||||
switch (substr($body, $pos, 1)) {
|
||||
case '/':
|
||||
$tagtype = 2;
|
||||
$pos++;
|
||||
break;
|
||||
case '!':
|
||||
/**
|
||||
* A comment or an SGML declaration.
|
||||
*/
|
||||
if (substr($body, $pos + 1, 2) == '--') {
|
||||
$gt = strpos($body, '-->', $pos);
|
||||
if ($gt === false) {
|
||||
$gt = strlen($body);
|
||||
} else {
|
||||
$gt += 2;
|
||||
}
|
||||
return array(false, false, false, $lt, $gt);
|
||||
} else {
|
||||
$gt = tln_findnxstr($body, $pos, '>');
|
||||
return array(false, false, false, $lt, $gt);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/**
|
||||
* Assume tagtype 1 for now. If it's type 3, we'll switch values
|
||||
* later.
|
||||
*/
|
||||
$tagtype = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Look for next [\W-_], which will indicate the end of the tag name.
|
||||
*/
|
||||
$regary = tln_findnxreg($body, $pos, '[^\w\-_]');
|
||||
if ($regary == false) {
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
list($pos, $tagname, $match) = $regary;
|
||||
$tagname = strtolower($tagname);
|
||||
|
||||
/**
|
||||
* $match can be either of these:
|
||||
* '>' indicating the end of the tag entirely.
|
||||
* '\s' indicating the end of the tag name.
|
||||
* '/' indicating that this is type-3 xhtml tag.
|
||||
*
|
||||
* Whatever else we find there indicates an invalid tag.
|
||||
*/
|
||||
switch ($match) {
|
||||
case '/':
|
||||
/**
|
||||
* This is an xhtml-style tag with a closing / at the
|
||||
* end, like so: <img src="blah"/>. Check if it's followed
|
||||
* by the closing bracket. If not, then this tag is invalid
|
||||
*/
|
||||
if (substr($body, $pos, 2) == '/>') {
|
||||
$pos++;
|
||||
$tagtype = 3;
|
||||
} else {
|
||||
$gt = tln_findnxstr($body, $pos, '>');
|
||||
$retary = array(false, false, false, $lt, $gt);
|
||||
return $retary;
|
||||
}
|
||||
//intentional fall-through
|
||||
case '>':
|
||||
return array($tagname, false, $tagtype, $lt, $pos);
|
||||
break;
|
||||
default:
|
||||
/**
|
||||
* Check if it's whitespace
|
||||
*/
|
||||
if (preg_match('/\s/', $match)) {
|
||||
} else {
|
||||
/**
|
||||
* This is an invalid tag! Look for the next closing ">".
|
||||
*/
|
||||
$gt = tln_findnxstr($body, $lt, '>');
|
||||
return array(false, false, false, $lt, $gt);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* At this point we're here:
|
||||
* <tagname attribute='blah'>
|
||||
* \-------^
|
||||
*
|
||||
* At this point we loop in order to find all attributes.
|
||||
*/
|
||||
$attary = array();
|
||||
|
||||
while ($pos <= strlen($body)) {
|
||||
$pos = tln_skipspace($body, $pos);
|
||||
if ($pos == strlen($body)) {
|
||||
/**
|
||||
* Non-closed tag.
|
||||
*/
|
||||
return array(false, false, false, $lt, $pos);
|
||||
}
|
||||
/**
|
||||
* See if we arrived at a ">" or "/>", which means that we reached
|
||||
* the end of the tag.
|
||||
*/
|
||||
$matches = array();
|
||||
preg_match('%^(\s*)(>|/>)%s', substr($body, $pos), $matches);
|
||||
if (isset($matches[0]) && $matches[0]) {
|
||||
/**
|
||||
* Yep. So we did.
|
||||
*/
|
||||
$pos += strlen($matches[1]);
|
||||
if ($matches[2] == '/>') {
|
||||
$tagtype = 3;
|
||||
$pos++;
|
||||
}
|
||||
return array($tagname, $attary, $tagtype, $lt, $pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* There are several types of attributes, with optional
|
||||
* [:space:] between members.
|
||||
* Type 1:
|
||||
* attrname[:space:]=[:space:]'CDATA'
|
||||
* Type 2:
|
||||
* attrname[:space:]=[:space:]"CDATA"
|
||||
* Type 3:
|
||||
* attr[:space:]=[:space:]CDATA
|
||||
* Type 4:
|
||||
* attrname
|
||||
*
|
||||
* We leave types 1 and 2 the same, type 3 we check for
|
||||
* '"' and convert to """ if needed, then wrap in
|
||||
* double quotes. Type 4 we convert into:
|
||||
* attrname="yes".
|
||||
*/
|
||||
$regary = tln_findnxreg($body, $pos, '[^\w\-_]');
|
||||
if ($regary == false) {
|
||||
/**
|
||||
* Looks like body ended before the end of tag.
|
||||
*/
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
list($pos, $attname, $match) = $regary;
|
||||
$attname = strtolower($attname);
|
||||
/**
|
||||
* We arrived at the end of attribute name. Several things possible
|
||||
* here:
|
||||
* '>' means the end of the tag and this is attribute type 4
|
||||
* '/' if followed by '>' means the same thing as above
|
||||
* '\s' means a lot of things -- look what it's followed by.
|
||||
* anything else means the attribute is invalid.
|
||||
*/
|
||||
switch ($match) {
|
||||
case '/':
|
||||
/**
|
||||
* This is an xhtml-style tag with a closing / at the
|
||||
* end, like so: <img src="blah"/>. Check if it's followed
|
||||
* by the closing bracket. If not, then this tag is invalid
|
||||
*/
|
||||
if (substr($body, $pos, 2) == '/>') {
|
||||
$pos++;
|
||||
$tagtype = 3;
|
||||
} else {
|
||||
$gt = tln_findnxstr($body, $pos, '>');
|
||||
$retary = array(false, false, false, $lt, $gt);
|
||||
return $retary;
|
||||
}
|
||||
//intentional fall-through
|
||||
case '>':
|
||||
$attary{$attname} = '"yes"';
|
||||
return array($tagname, $attary, $tagtype, $lt, $pos);
|
||||
break;
|
||||
default:
|
||||
/**
|
||||
* Skip whitespace and see what we arrive at.
|
||||
*/
|
||||
$pos = tln_skipspace($body, $pos);
|
||||
$char = substr($body, $pos, 1);
|
||||
/**
|
||||
* Two things are valid here:
|
||||
* '=' means this is attribute type 1 2 or 3.
|
||||
* \w means this was attribute type 4.
|
||||
* anything else we ignore and re-loop. End of tag and
|
||||
* invalid stuff will be caught by our checks at the beginning
|
||||
* of the loop.
|
||||
*/
|
||||
if ($char == '=') {
|
||||
$pos++;
|
||||
$pos = tln_skipspace($body, $pos);
|
||||
/**
|
||||
* Here are 3 possibilities:
|
||||
* "'" attribute type 1
|
||||
* '"' attribute type 2
|
||||
* everything else is the content of tag type 3
|
||||
*/
|
||||
$quot = substr($body, $pos, 1);
|
||||
if ($quot == '\'') {
|
||||
$regary = tln_findnxreg($body, $pos + 1, '\'');
|
||||
if ($regary == false) {
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
list($pos, $attval, $match) = $regary;
|
||||
$pos++;
|
||||
$attary{$attname} = '\'' . $attval . '\'';
|
||||
} else {
|
||||
if ($quot == '"') {
|
||||
$regary = tln_findnxreg($body, $pos + 1, '\"');
|
||||
if ($regary == false) {
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
list($pos, $attval, $match) = $regary;
|
||||
$pos++;
|
||||
$attary{$attname} = '"' . $attval . '"';
|
||||
} else {
|
||||
/**
|
||||
* These are hateful. Look for \s, or >.
|
||||
*/
|
||||
$regary = tln_findnxreg($body, $pos, '[\s>]');
|
||||
if ($regary == false) {
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
list($pos, $attval, $match) = $regary;
|
||||
/**
|
||||
* If it's ">" it will be caught at the top.
|
||||
*/
|
||||
$attval = preg_replace('/\"/s', '"', $attval);
|
||||
$attary{$attname} = '"' . $attval . '"';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (preg_match('|[\w/>]|', $char)) {
|
||||
/**
|
||||
* That was attribute type 4.
|
||||
*/
|
||||
$attary{$attname} = '"yes"';
|
||||
} else {
|
||||
/**
|
||||
* An illegal character. Find next '>' and return.
|
||||
*/
|
||||
$gt = tln_findnxstr($body, $pos, '>');
|
||||
return array(false, false, false, $lt, $gt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* The fact that we got here indicates that the tag end was never
|
||||
* found. Return invalid tag indication so it gets stripped.
|
||||
*/
|
||||
return array(false, false, false, $lt, strlen($body));
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates entities into literal values so they can be checked.
|
||||
*
|
||||
* @param string $attvalue the by-ref value to check.
|
||||
* @param string $regex the regular expression to check against.
|
||||
* @param boolean $hex whether the entites are hexadecimal.
|
||||
* @return boolean True or False depending on whether there were matches.
|
||||
*/
|
||||
function tln_deent(&$attvalue, $regex, $hex = false)
|
||||
{
|
||||
preg_match_all($regex, $attvalue, $matches);
|
||||
if (is_array($matches) && sizeof($matches[0]) > 0) {
|
||||
$repl = array();
|
||||
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
||||
$numval = $matches[1][$i];
|
||||
if ($hex) {
|
||||
$numval = hexdec($numval);
|
||||
}
|
||||
$repl{$matches[0][$i]} = chr($numval);
|
||||
}
|
||||
$attvalue = strtr($attvalue, $repl);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function checks attribute values for entity-encoded values
|
||||
* and returns them translated into 8-bit strings so we can run
|
||||
* checks on them.
|
||||
*
|
||||
* @param string $attvalue A string to run entity check against.
|
||||
* @return Void, modifies a reference value.
|
||||
*/
|
||||
function tln_defang(&$attvalue)
|
||||
{
|
||||
/**
|
||||
* Skip this if there aren't ampersands or backslashes.
|
||||
*/
|
||||
if (strpos($attvalue, '&') === false
|
||||
&& strpos($attvalue, '\\') === false
|
||||
) {
|
||||
return;
|
||||
}
|
||||
do {
|
||||
$m = false;
|
||||
$m = $m || tln_deent($attvalue, '/\�*(\d+);*/s');
|
||||
$m = $m || tln_deent($attvalue, '/\�*((\d|[a-f])+);*/si', true);
|
||||
$m = $m || tln_deent($attvalue, '/\\\\(\d+)/s', true);
|
||||
} while ($m == true);
|
||||
$attvalue = stripslashes($attvalue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kill any tabs, newlines, or carriage returns. Our friends the
|
||||
* makers of the browser with 95% market value decided that it'd
|
||||
* be funny to make "java[tab]script" be just as good as "javascript".
|
||||
*
|
||||
* @param string $attvalue The attribute value before extraneous spaces removed.
|
||||
* @return Void, modifies a reference value.
|
||||
*/
|
||||
function tln_unspace(&$attvalue)
|
||||
{
|
||||
if (strcspn($attvalue, "\t\r\n\0 ") != strlen($attvalue)) {
|
||||
$attvalue = str_replace(
|
||||
array("\t", "\r", "\n", "\0", " "),
|
||||
array('', '', '', '', ''),
|
||||
$attvalue
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function runs various checks against the attributes.
|
||||
*
|
||||
* @param string $tagname String with the name of the tag.
|
||||
* @param array $attary Array with all tag attributes.
|
||||
* @param array $rm_attnames See description for tln_sanitize
|
||||
* @param array $bad_attvals See description for tln_sanitize
|
||||
* @param array $add_attr_to_tag See description for tln_sanitize
|
||||
* @return Array with modified attributes.
|
||||
*/
|
||||
function tln_fixatts(
|
||||
$tagname,
|
||||
$attary,
|
||||
$rm_attnames,
|
||||
$bad_attvals,
|
||||
$add_attr_to_tag
|
||||
) {
|
||||
while (list($attname, $attvalue) = each($attary)) {
|
||||
/**
|
||||
* See if this attribute should be removed.
|
||||
*/
|
||||
foreach ($rm_attnames as $matchtag => $matchattrs) {
|
||||
if (preg_match($matchtag, $tagname)) {
|
||||
foreach ($matchattrs as $matchattr) {
|
||||
if (preg_match($matchattr, $attname)) {
|
||||
unset($attary{$attname});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove any backslashes, entities, or extraneous whitespace.
|
||||
*/
|
||||
tln_defang($attvalue);
|
||||
tln_unspace($attvalue);
|
||||
|
||||
/**
|
||||
* Now let's run checks on the attvalues.
|
||||
* I don't expect anyone to comprehend this. If you do,
|
||||
* get in touch with me so I can drive to where you live and
|
||||
* shake your hand personally. :)
|
||||
*/
|
||||
foreach ($bad_attvals as $matchtag => $matchattrs) {
|
||||
if (preg_match($matchtag, $tagname)) {
|
||||
foreach ($matchattrs as $matchattr => $valary) {
|
||||
if (preg_match($matchattr, $attname)) {
|
||||
/**
|
||||
* There are two arrays in valary.
|
||||
* First is matches.
|
||||
* Second one is replacements
|
||||
*/
|
||||
list($valmatch, $valrepl) = $valary;
|
||||
$newvalue = preg_replace($valmatch, $valrepl, $attvalue);
|
||||
if ($newvalue != $attvalue) {
|
||||
$attary{$attname} = $newvalue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* See if we need to append any attributes to this tag.
|
||||
*/
|
||||
foreach ($add_attr_to_tag as $matchtag => $addattary) {
|
||||
if (preg_match($matchtag, $tagname)) {
|
||||
$attary = array_merge($attary, $addattary);
|
||||
}
|
||||
}
|
||||
return $attary;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $body The HTML you wish to filter
|
||||
* @param array $tag_list see description above
|
||||
* @param array $rm_tags_with_content see description above
|
||||
* @param array $self_closing_tags see description above
|
||||
* @param boolean $force_tag_closing see description above
|
||||
* @param array $rm_attnames see description above
|
||||
* @param array $bad_attvals see description above
|
||||
* @param array $add_attr_to_tag see description above
|
||||
* @return string Sanitized html safe to show on your pages.
|
||||
*/
|
||||
function tln_sanitize(
|
||||
$body,
|
||||
$tag_list,
|
||||
$rm_tags_with_content,
|
||||
$self_closing_tags,
|
||||
$force_tag_closing,
|
||||
$rm_attnames,
|
||||
$bad_attvals,
|
||||
$add_attr_to_tag
|
||||
) {
|
||||
/**
|
||||
* Normalize rm_tags and rm_tags_with_content.
|
||||
*/
|
||||
$rm_tags = array_shift($tag_list);
|
||||
@array_walk($tag_list, 'tln_casenormalize');
|
||||
@array_walk($rm_tags_with_content, 'tln_casenormalize');
|
||||
@array_walk($self_closing_tags, 'tln_casenormalize');
|
||||
/**
|
||||
* See if tag_list is of tags to remove or tags to allow.
|
||||
* false means remove these tags
|
||||
* true means allow these tags
|
||||
*/
|
||||
$curpos = 0;
|
||||
$open_tags = array();
|
||||
$trusted = "<!-- begin tln_sanitized html -->\n";
|
||||
$skip_content = false;
|
||||
/**
|
||||
* Take care of netscape's stupid javascript entities like
|
||||
* &{alert('boo')};
|
||||
*/
|
||||
$body = preg_replace('/&(\{.*?\};)/si', '&\\1', $body);
|
||||
while (($curtag = tln_getnxtag($body, $curpos)) != false) {
|
||||
list($tagname, $attary, $tagtype, $lt, $gt) = $curtag;
|
||||
$free_content = substr($body, $curpos, $lt - $curpos);
|
||||
if ($skip_content == false) {
|
||||
$trusted .= $free_content;
|
||||
} else {
|
||||
}
|
||||
if ($tagname != false) {
|
||||
if ($tagtype == 2) {
|
||||
if ($skip_content == $tagname) {
|
||||
/**
|
||||
* Got to the end of tag we needed to remove.
|
||||
*/
|
||||
$tagname = false;
|
||||
$skip_content = false;
|
||||
} else {
|
||||
if ($skip_content == false) {
|
||||
if (isset($open_tags{$tagname}) &&
|
||||
$open_tags{$tagname} > 0
|
||||
) {
|
||||
$open_tags{$tagname}--;
|
||||
} else {
|
||||
$tagname = false;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* $rm_tags_with_content
|
||||
*/
|
||||
if ($skip_content == false) {
|
||||
/**
|
||||
* See if this is a self-closing type and change
|
||||
* tagtype appropriately.
|
||||
*/
|
||||
if ($tagtype == 1
|
||||
&& in_array($tagname, $self_closing_tags)
|
||||
) {
|
||||
$tagtype = 3;
|
||||
}
|
||||
/**
|
||||
* See if we should skip this tag and any content
|
||||
* inside it.
|
||||
*/
|
||||
if ($tagtype == 1
|
||||
&& in_array($tagname, $rm_tags_with_content)
|
||||
) {
|
||||
$skip_content = $tagname;
|
||||
} else {
|
||||
if (($rm_tags == false
|
||||
&& in_array($tagname, $tag_list)) ||
|
||||
($rm_tags == true
|
||||
&& !in_array($tagname, $tag_list))
|
||||
) {
|
||||
$tagname = false;
|
||||
} else {
|
||||
if ($tagtype == 1) {
|
||||
if (isset($open_tags{$tagname})) {
|
||||
$open_tags{$tagname}++;
|
||||
} else {
|
||||
$open_tags{$tagname} = 1;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This is where we run other checks.
|
||||
*/
|
||||
if (is_array($attary) && sizeof($attary) > 0) {
|
||||
$attary = tln_fixatts(
|
||||
$tagname,
|
||||
$attary,
|
||||
$rm_attnames,
|
||||
$bad_attvals,
|
||||
$add_attr_to_tag
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
if ($tagname != false && $skip_content == false) {
|
||||
$trusted .= tln_tagprint($tagname, $attary, $tagtype);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
$curpos = $gt + 1;
|
||||
}
|
||||
$trusted .= substr($body, $curpos, strlen($body) - $curpos);
|
||||
if ($force_tag_closing == true) {
|
||||
foreach ($open_tags as $tagname => $opentimes) {
|
||||
while ($opentimes > 0) {
|
||||
$trusted .= '</' . $tagname . '>';
|
||||
$opentimes--;
|
||||
}
|
||||
}
|
||||
$trusted .= "\n";
|
||||
}
|
||||
$trusted .= "<!-- end tln_sanitized html -->\n";
|
||||
return $trusted;
|
||||
}
|
||||
|
||||
//
|
||||
// Use the nifty htmlfilter library
|
||||
//
|
||||
|
||||
|
||||
function HTMLFilter($body, $trans_image_path, $block_external_images = false)
|
||||
{
|
||||
|
||||
$tag_list = array(
|
||||
false,
|
||||
"object",
|
||||
"meta",
|
||||
"html",
|
||||
"head",
|
||||
"base",
|
||||
"link",
|
||||
"frame",
|
||||
"iframe",
|
||||
"plaintext",
|
||||
"marquee"
|
||||
);
|
||||
|
||||
$rm_tags_with_content = array(
|
||||
"script",
|
||||
"applet",
|
||||
"embed",
|
||||
"title",
|
||||
"frameset",
|
||||
"xmp",
|
||||
"xml"
|
||||
);
|
||||
|
||||
$self_closing_tags = array(
|
||||
"img",
|
||||
"br",
|
||||
"hr",
|
||||
"input",
|
||||
"outbind"
|
||||
);
|
||||
|
||||
$force_tag_closing = true;
|
||||
|
||||
$rm_attnames = array(
|
||||
"/.*/" =>
|
||||
array(
|
||||
// "/target/i",
|
||||
"/^on.*/i",
|
||||
"/^dynsrc/i",
|
||||
"/^data.*/i",
|
||||
"/^lowsrc.*/i"
|
||||
)
|
||||
);
|
||||
|
||||
$bad_attvals = array(
|
||||
"/.*/" =>
|
||||
array(
|
||||
"/^src|background/i" =>
|
||||
array(
|
||||
array(
|
||||
'/^([\'"])\s*\S+script\s*:.*([\'"])/si',
|
||||
'/^([\'"])\s*mocha\s*:*.*([\'"])/si',
|
||||
'/^([\'"])\s*about\s*:.*([\'"])/si'
|
||||
),
|
||||
array(
|
||||
"\\1$trans_image_path\\2",
|
||||
"\\1$trans_image_path\\2",
|
||||
"\\1$trans_image_path\\2",
|
||||
"\\1$trans_image_path\\2"
|
||||
)
|
||||
),
|
||||
"/^href|action/i" =>
|
||||
array(
|
||||
array(
|
||||
'/^([\'"])\s*\S+script\s*:.*([\'"])/si',
|
||||
'/^([\'"])\s*mocha\s*:*.*([\'"])/si',
|
||||
'/^([\'"])\s*about\s*:.*([\'"])/si'
|
||||
),
|
||||
array(
|
||||
"\\1#\\1",
|
||||
"\\1#\\1",
|
||||
"\\1#\\1",
|
||||
"\\1#\\1"
|
||||
)
|
||||
),
|
||||
"/^style/i" =>
|
||||
array(
|
||||
array(
|
||||
"/expression/i",
|
||||
"/binding/i",
|
||||
"/behaviou*r/i",
|
||||
"/include-source/i",
|
||||
'/position\s*:\s*absolute/i',
|
||||
'/url\s*\(\s*([\'"])\s*\S+script\s*:.*([\'"])\s*\)/si',
|
||||
'/url\s*\(\s*([\'"])\s*mocha\s*:.*([\'"])\s*\)/si',
|
||||
'/url\s*\(\s*([\'"])\s*about\s*:.*([\'"])\s*\)/si',
|
||||
'/(.*)\s*:\s*url\s*\(\s*([\'"]*)\s*\S+script\s*:.*([\'"]*)\s*\)/si'
|
||||
),
|
||||
array(
|
||||
"idiocy",
|
||||
"idiocy",
|
||||
"idiocy",
|
||||
"idiocy",
|
||||
"",
|
||||
"url(\\1#\\1)",
|
||||
"url(\\1#\\1)",
|
||||
"url(\\1#\\1)",
|
||||
"url(\\1#\\1)",
|
||||
"url(\\1#\\1)",
|
||||
"\\1:url(\\2#\\3)"
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($block_external_images) {
|
||||
array_push(
|
||||
$bad_attvals{'/.*/'}{'/^src|background/i'}[0],
|
||||
'/^([\'\"])\s*https*:.*([\'\"])/si'
|
||||
);
|
||||
array_push(
|
||||
$bad_attvals{'/.*/'}{'/^src|background/i'}[1],
|
||||
"\\1$trans_image_path\\1"
|
||||
);
|
||||
array_push(
|
||||
$bad_attvals{'/.*/'}{'/^style/i'}[0],
|
||||
'/url\(([\'\"])\s*https*:.*([\'\"])\)/si'
|
||||
);
|
||||
array_push(
|
||||
$bad_attvals{'/.*/'}{'/^style/i'}[1],
|
||||
"url(\\1$trans_image_path\\1)"
|
||||
);
|
||||
}
|
||||
|
||||
$add_attr_to_tag = array(
|
||||
"/^a$/i" =>
|
||||
array('target' => '"_blank"')
|
||||
);
|
||||
|
||||
$trusted = tln_sanitize(
|
||||
$body,
|
||||
$tag_list,
|
||||
$rm_tags_with_content,
|
||||
$self_closing_tags,
|
||||
$force_tag_closing,
|
||||
$rm_attnames,
|
||||
$bad_attvals,
|
||||
$add_attr_to_tag
|
||||
);
|
||||
return $trusted;
|
||||
}
|
||||
185
mailer/extras/ntlm_sasl_client.php
Executable file
185
mailer/extras/ntlm_sasl_client.php
Executable file
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
/*
|
||||
* ntlm_sasl_client.php
|
||||
*
|
||||
* @(#) $Id: ntlm_sasl_client.php,v 1.3 2004/11/17 08:00:37 mlemos Exp $
|
||||
*
|
||||
**
|
||||
** Source: http://www.phpclasses.org/browse/file/7495.html
|
||||
** License: BSD (http://www.phpclasses.org/package/1888-PHP-Single-API-for-standard-authentication-mechanisms.html)
|
||||
** Bundled with Permission
|
||||
**
|
||||
*/
|
||||
|
||||
define("SASL_NTLM_STATE_START", 0);
|
||||
define("SASL_NTLM_STATE_IDENTIFY_DOMAIN", 1);
|
||||
define("SASL_NTLM_STATE_RESPOND_CHALLENGE", 2);
|
||||
define("SASL_NTLM_STATE_DONE", 3);
|
||||
|
||||
class ntlm_sasl_client_class
|
||||
{
|
||||
var $credentials=array();
|
||||
var $state=SASL_NTLM_STATE_START;
|
||||
|
||||
Function Initialize(&$client)
|
||||
{
|
||||
if(!function_exists($function="mcrypt_encrypt")
|
||||
|| !function_exists($function="mhash"))
|
||||
{
|
||||
$extensions=array(
|
||||
"mcrypt_encrypt"=>"mcrypt",
|
||||
"mhash"=>"mhash"
|
||||
);
|
||||
$client->error="the extension ".$extensions[$function]." required by the NTLM SASL client class is not available in this PHP configuration";
|
||||
return(0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
Function ASCIIToUnicode($ascii)
|
||||
{
|
||||
for($unicode="",$a=0;$a<strlen($ascii);$a++)
|
||||
$unicode.=substr($ascii,$a,1).chr(0);
|
||||
return($unicode);
|
||||
}
|
||||
|
||||
Function TypeMsg1($domain,$workstation)
|
||||
{
|
||||
$domain_length=strlen($domain);
|
||||
$workstation_length=strlen($workstation);
|
||||
$workstation_offset=32;
|
||||
$domain_offset=$workstation_offset+$workstation_length;
|
||||
return(
|
||||
"NTLMSSP\0".
|
||||
"\x01\x00\x00\x00".
|
||||
"\x07\x32\x00\x00".
|
||||
pack("v",$domain_length).
|
||||
pack("v",$domain_length).
|
||||
pack("V",$domain_offset).
|
||||
pack("v",$workstation_length).
|
||||
pack("v",$workstation_length).
|
||||
pack("V",$workstation_offset).
|
||||
$workstation.
|
||||
$domain
|
||||
);
|
||||
}
|
||||
|
||||
Function NTLMResponse($challenge,$password)
|
||||
{
|
||||
$unicode=$this->ASCIIToUnicode($password);
|
||||
$md4=mhash(MHASH_MD4,$unicode);
|
||||
$padded=$md4.str_repeat(chr(0),21-strlen($md4));
|
||||
$iv_size=mcrypt_get_iv_size(MCRYPT_DES,MCRYPT_MODE_ECB);
|
||||
$iv=mcrypt_create_iv($iv_size,MCRYPT_RAND);
|
||||
for($response="",$third=0;$third<21;$third+=7)
|
||||
{
|
||||
for($packed="",$p=$third;$p<$third+7;$p++)
|
||||
$packed.=str_pad(decbin(ord(substr($padded,$p,1))),8,"0",STR_PAD_LEFT);
|
||||
for($key="",$p=0;$p<strlen($packed);$p+=7)
|
||||
{
|
||||
$s=substr($packed,$p,7);
|
||||
$b=$s.((substr_count($s,"1") % 2) ? "0" : "1");
|
||||
$key.=chr(bindec($b));
|
||||
}
|
||||
$ciphertext=mcrypt_encrypt(MCRYPT_DES,$key,$challenge,MCRYPT_MODE_ECB,$iv);
|
||||
$response.=$ciphertext;
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
Function TypeMsg3($ntlm_response,$user,$domain,$workstation)
|
||||
{
|
||||
$domain_unicode=$this->ASCIIToUnicode($domain);
|
||||
$domain_length=strlen($domain_unicode);
|
||||
$domain_offset=64;
|
||||
$user_unicode=$this->ASCIIToUnicode($user);
|
||||
$user_length=strlen($user_unicode);
|
||||
$user_offset=$domain_offset+$domain_length;
|
||||
$workstation_unicode=$this->ASCIIToUnicode($workstation);
|
||||
$workstation_length=strlen($workstation_unicode);
|
||||
$workstation_offset=$user_offset+$user_length;
|
||||
$lm="";
|
||||
$lm_length=strlen($lm);
|
||||
$lm_offset=$workstation_offset+$workstation_length;
|
||||
$ntlm=$ntlm_response;
|
||||
$ntlm_length=strlen($ntlm);
|
||||
$ntlm_offset=$lm_offset+$lm_length;
|
||||
$session="";
|
||||
$session_length=strlen($session);
|
||||
$session_offset=$ntlm_offset+$ntlm_length;
|
||||
return(
|
||||
"NTLMSSP\0".
|
||||
"\x03\x00\x00\x00".
|
||||
pack("v",$lm_length).
|
||||
pack("v",$lm_length).
|
||||
pack("V",$lm_offset).
|
||||
pack("v",$ntlm_length).
|
||||
pack("v",$ntlm_length).
|
||||
pack("V",$ntlm_offset).
|
||||
pack("v",$domain_length).
|
||||
pack("v",$domain_length).
|
||||
pack("V",$domain_offset).
|
||||
pack("v",$user_length).
|
||||
pack("v",$user_length).
|
||||
pack("V",$user_offset).
|
||||
pack("v",$workstation_length).
|
||||
pack("v",$workstation_length).
|
||||
pack("V",$workstation_offset).
|
||||
pack("v",$session_length).
|
||||
pack("v",$session_length).
|
||||
pack("V",$session_offset).
|
||||
"\x01\x02\x00\x00".
|
||||
$domain_unicode.
|
||||
$user_unicode.
|
||||
$workstation_unicode.
|
||||
$lm.
|
||||
$ntlm
|
||||
);
|
||||
}
|
||||
|
||||
Function Start(&$client, &$message, &$interactions)
|
||||
{
|
||||
if($this->state!=SASL_NTLM_STATE_START)
|
||||
{
|
||||
$client->error="NTLM authentication state is not at the start";
|
||||
return(SASL_FAIL);
|
||||
}
|
||||
$this->credentials=array(
|
||||
"user"=>"",
|
||||
"password"=>"",
|
||||
"realm"=>"",
|
||||
"workstation"=>""
|
||||
);
|
||||
$defaults=array();
|
||||
$status=$client->GetCredentials($this->credentials,$defaults,$interactions);
|
||||
if($status==SASL_CONTINUE)
|
||||
$this->state=SASL_NTLM_STATE_IDENTIFY_DOMAIN;
|
||||
Unset($message);
|
||||
return($status);
|
||||
}
|
||||
|
||||
Function Step(&$client, $response, &$message, &$interactions)
|
||||
{
|
||||
switch($this->state)
|
||||
{
|
||||
case SASL_NTLM_STATE_IDENTIFY_DOMAIN:
|
||||
$message=$this->TypeMsg1($this->credentials["realm"],$this->credentials["workstation"]);
|
||||
$this->state=SASL_NTLM_STATE_RESPOND_CHALLENGE;
|
||||
break;
|
||||
case SASL_NTLM_STATE_RESPOND_CHALLENGE:
|
||||
$ntlm_response=$this->NTLMResponse(substr($response,24,8),$this->credentials["password"]);
|
||||
$message=$this->TypeMsg3($ntlm_response,$this->credentials["user"],$this->credentials["realm"],$this->credentials["workstation"]);
|
||||
$this->state=SASL_NTLM_STATE_DONE;
|
||||
break;
|
||||
case SASL_NTLM_STATE_DONE:
|
||||
$client->error="NTLM authentication was finished without success";
|
||||
return(SASL_FAIL);
|
||||
default:
|
||||
$client->error="invalid NTLM authentication step state";
|
||||
return(SASL_FAIL);
|
||||
}
|
||||
return(SASL_CONTINUE);
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
||||
26
mailer/language/phpmailer.lang-ar.php
Executable file
26
mailer/language/phpmailer.lang-ar.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Arabic PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author bahjat al mostafa <bahjat983@hotmail.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'] = 'خطأ على مستوى عنوان المرسل : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
|
||||
'فشل في الارسال لكل من : ';
|
||||
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
|
||||
25
mailer/language/phpmailer.lang-be.php
Executable file
25
mailer/language/phpmailer.lang-be.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Belarusian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Aleksander Maksymiuk <info@setpro.pl>
|
||||
*/
|
||||
|
||||
$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'] = 'Няправільны адрас адпраўніка: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';
|
||||
26
mailer/language/phpmailer.lang-br.php
Executable file
26
mailer/language/phpmailer.lang-br.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?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>
|
||||
*/
|
||||
|
||||
$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 com o servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensagem vazio';
|
||||
$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 endereços dos remententes a seguir falharam: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Não enviando, endereço de e-mail inválido: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Você deve fornecer pelo menos um endereço de destinatário de e-mail.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
|
||||
$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 resetar a variável: ';
|
||||
25
mailer/language/phpmailer.lang-ca.php
Executable file
25
mailer/language/phpmailer.lang-ca.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Catalan PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Ivan <web AT microstudi DOT com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
|
||||
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
|
||||
$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Error al signar: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: ';
|
||||
25
mailer/language/phpmailer.lang-ch.php
Executable file
25
mailer/language/phpmailer.lang-ch.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Chinese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author LiuXin <http://www.80x86.cn/blog/>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||
$PHPMAILER_LANG['execute'] = '不能执行: ';
|
||||
$PHPMAILER_LANG['file_access'] = '不能访问文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
|
||||
$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||
//$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: ';
|
||||
24
mailer/language/phpmailer.lang-cz.php
Executable file
24
mailer/language/phpmailer.lang-cz.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?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: ';
|
||||
24
mailer/language/phpmailer.lang-de.php
Executable file
24
mailer/language/phpmailer.lang-de.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* German PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
|
||||
$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['empty_message'] = 'E-Mail Inhalt ist leer.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Unbekanntes Encoding-Format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Konnte folgenden Befehl nicht ausführen: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
|
||||
$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['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Fehler beim Signieren: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
|
||||
25
mailer/language/phpmailer.lang-dk.php
Executable file
25
mailer/language/phpmailer.lang-dk.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?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'] = 'Not sending, email address is invalid: ';
|
||||
$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: ';
|
||||
24
mailer/language/phpmailer.lang-el.php
Executable file
24
mailer/language/phpmailer.lang-el.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Greek PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .';
|
||||
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναί δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν αποστέλθηκε, η διεύθυνση δεν είναι έγκυρη.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτων διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';
|
||||
24
mailer/language/phpmailer.lang-eo.php
Executable file
24
mailer/language/phpmailer.lang-eo.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Esperanto PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eraro de servilo SMTP : aŭtentigo malsukcesis.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eraro de servilo SMTP : konektado al servilo malsukcesis.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eraro de servilo SMTP : neĝustaj datumoj.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Teksto de mesaĝo mankas.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nekonata kodoprezento: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Lanĉi rulumadon ne eblis: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Aliro al dosiero ne sukcesis: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eraro de dosiero: malfermo neeblas: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Jena adreso de sendinto malsukcesis: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Genero de retmesaĝa funkcio neeblis.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Retadreso ne validas: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mesaĝilo ne subtenata.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Vi devas tajpi almenaŭ unu recevontan retadreson.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Eraro de servilo SMTP : la jenaj poŝtrecivuloj kaŭzis eraron: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Eraro de subskribo: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
|
||||
25
mailer/language/phpmailer.lang-es.php
Executable file
25
mailer/language/phpmailer.lang-es.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Spanish PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Matt Sturdy <matt.sturdy@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No se pudo autentificar.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No se pudo conectar al servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Cuerpo del mensaje vacío';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'No se pudo ejecutar: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'No se pudo acceder al archivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: No se pudo abrir el archivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'No se pudo crear una instancia de la función Mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'No se pudo enviar: dirección de email inválido: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Debe proveer al menos una dirección de email como destino.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() se falló.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'No se pudo ajustar o reajustar la variable: ';
|
||||
26
mailer/language/phpmailer.lang-et.php
Executable file
26
mailer/language/phpmailer.lang-et.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Estonian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Indrek Päri
|
||||
* @author Elan Ruusamäe <glen@delfi.ee>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu';
|
||||
$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
|
||||
$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: ';
|
||||
26
mailer/language/phpmailer.lang-fa.php
Executable file
26
mailer/language/phpmailer.lang-fa.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Persian/Farsi PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Ali Jazayeri <jaza.ali@gmail.com>
|
||||
* @author Mohammad Hossein Mojtahedi <mhm5000@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'] = 'خطای File: امکان بازکردن فایل وجود ندارد: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمیشود.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: ';
|
||||
$PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
|
||||
26
mailer/language/phpmailer.lang-fi.php
Executable file
26
mailer/language/phpmailer.lang-fi.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Finnish PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Jyry Kuukanen
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-virhe: käyttäjätunnistus epäonnistui.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-virhe: data on virheellinen.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Suoritus epäonnistui: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Seuraavaan tiedostoon ei ole oikeuksia: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Seuraava lähettäjän osoite on virheellinen: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||
//$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: ';
|
||||
25
mailer/language/phpmailer.lang-fo.php
Executable file
25
mailer/language/phpmailer.lang-fo.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Faroese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Dávur Sørensen <http://www.profo-webdesign.dk>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ókend encoding: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
|
||||
//$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: ';
|
||||
28
mailer/language/phpmailer.lang-fr.php
Executable file
28
mailer/language/phpmailer.lang-fr.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* French PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* Some French punctuation requires a thin non-breaking space (U+202F) character before it,
|
||||
* for example before a colon or exclamation mark.
|
||||
* There is one of these characters between these quotes: " "
|
||||
* @link http://unicode.org/udhr/n/notes_fra.html
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP : impossible de se connecter au serveur SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP : données incorrectes.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu : ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution : ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier : ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible : ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide : ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Vous devez fournir au moins une adresse de destinataire.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP : les destinataires suivants sont en erreur : ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : ';
|
||||
25
mailer/language/phpmailer.lang-gl.php
Executable file
25
mailer/language/phpmailer.lang-gl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Galician PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author by Donato Rouco <donatorouco@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Non puido ser executado: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erro ó firmar: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: ';
|
||||
25
mailer/language/phpmailer.lang-he.php
Executable file
25
mailer/language/phpmailer.lang-he.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Hebrew PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Ronny Sherer <ronny@hoojima.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה';
|
||||
$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: ';
|
||||
$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: ';
|
||||
$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: ';
|
||||
25
mailer/language/phpmailer.lang-hr.php
Executable file
25
mailer/language/phpmailer.lang-hr.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Croatian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Hrvoj3e <hrvoj3e@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: ';
|
||||
$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 s navedenih e-mail adresa nije uspjelo: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa 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'] = 'Definirajte barem jednu adresu primatelja.';
|
||||
$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: ';
|
||||
25
mailer/language/phpmailer.lang-hu.php
Executable file
25
mailer/language/phpmailer.lang-hu.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Hungarian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author @dominicus-75
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP hiba: az azonosítás sikertelen.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP hiba: nem lehet kapcsolódni az SMTP-szerverhez.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP hiba: adatok visszautasítva.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Üres az üzenettörzs.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ismeretlen kódolás: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nem lehet végrehajtani: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'A következő fájl nem elérhető: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fájl hiba: a következő fájlt nem lehet megnyitni: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'A feladóként megadott következő cím hibás: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'A PHP mail() függvényt nem sikerült végrehajtani.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Érvénytelen cím: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' a mailer-osztály nem támogatott.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Legalább egy címzettet fel kell tüntetni.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP hiba: a címzettként megadott következő címek hibásak: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Hibás aláírás: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Hiba az SMTP-kapcsolatban.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-szerver hiba: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'A következő változók beállítása nem sikerült: ';
|
||||
26
mailer/language/phpmailer.lang-it.php
Executable file
26
mailer/language/phpmailer.lang-it.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Italian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Ilias Bartolini <brain79@inwind.it>
|
||||
* @author Stefano Sabatini <sabas88@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
|
||||
26
mailer/language/phpmailer.lang-ja.php
Executable file
26
mailer/language/phpmailer.lang-ja.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Japanese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Mitsuhiro Yoshida <http://mitstek.com/>
|
||||
* @author Yoshi Sakai <http://bluemooninc.jp/>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
|
||||
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
|
||||
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
|
||||
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
|
||||
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
|
||||
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||
//$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: ';
|
||||
25
mailer/language/phpmailer.lang-ka.php
Executable file
25
mailer/language/phpmailer.lang-ka.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Georgian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';
|
||||
$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: ';
|
||||
$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';
|
||||
$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
|
||||
25
mailer/language/phpmailer.lang-lt.php
Executable file
25
mailer/language/phpmailer.lang-lt.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Lithuanian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Dainius Kaupaitis <dk@sum.lt>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias';
|
||||
$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: ';
|
||||
25
mailer/language/phpmailer.lang-lv.php
Executable file
25
mailer/language/phpmailer.lang-lv.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Latvian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Eduards M. <e@npd.lv>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs';
|
||||
$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: ';
|
||||
25
mailer/language/phpmailer.lang-nl.php
Executable file
25
mailer/language/phpmailer.lang-nl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Dutch PHPMailer language file: refer to class.phpmailer.php for definitive list.
|
||||
* @package PHPMailer
|
||||
* @author Tuxion <team@tuxion.nl>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
|
||||
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';
|
||||
24
mailer/language/phpmailer.lang-no.php
Executable file
24
mailer/language/phpmailer.lang-no.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Norwegian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke authentisere.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP host.';
|
||||
$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: ';
|
||||
25
mailer/language/phpmailer.lang-pl.php
Executable file
25
mailer/language/phpmailer.lang-pl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Polish PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nieznany sposób kodowania znaków: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nie można uruchomić: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, '.
|
||||
'następujący adres Odbiorcy jest nieprawidłowy: ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
|
||||
25
mailer/language/phpmailer.lang-pt.php
Executable file
25
mailer/language/phpmailer.lang-pt.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Portuguese (European) PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Jonadabe <jonadabe@hotmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está 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 aceder o ficheiro: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
|
||||
$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: ';
|
||||
25
mailer/language/phpmailer.lang-ro.php
Executable file
25
mailer/language/phpmailer.lang-ro.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Catalin Constantin <catalin@dazoot.ro>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida. ';
|
||||
$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['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
|
||||
$PHPMAILER_LANG['signing'] = 'A aparut o problema la semnarea emailului. ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
|
||||
25
mailer/language/phpmailer.lang-ru.php
Executable file
25
mailer/language/phpmailer.lang-ru.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Russian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Alexey Chumakov <alex@chumakov.ru>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - почтовый сервер не поддерживается.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
|
||||
25
mailer/language/phpmailer.lang-se.php
Executable file
25
mailer/language/phpmailer.lang-se.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?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'] = 'Not sending, email address is invalid: ';
|
||||
$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'] = '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: ';
|
||||
25
mailer/language/phpmailer.lang-sk.php
Executable file
25
mailer/language/phpmailer.lang-sk.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Slovak PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Michal Tinka <michaltinka@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
|
||||
$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: ';
|
||||
25
mailer/language/phpmailer.lang-sr.php
Executable file
25
mailer/language/phpmailer.lang-sr.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?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'] = 'Није могуће задати променљиву, нити је вратити уназад: ';
|
||||
28
mailer/language/phpmailer.lang-tr.php
Executable file
28
mailer/language/phpmailer.lang-tr.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Turkish PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Elçin Özel
|
||||
* @author Can Yılmaz
|
||||
* @author Mehmet Benlioğlu
|
||||
* @author @yasinaydin
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mesajın içeriği boş';
|
||||
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen karakter kodlama: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Çalıştırılamadı: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemedi: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamadı: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Belirtilen adreslere gönderme başarısız: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Örnek e-posta fonksiyonu oluşturulamadı.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Geçersiz e-posta adresi: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'En az bir alıcı e-posta adresi belirtmelisiniz.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: ';
|
||||
$PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
|
||||
25
mailer/language/phpmailer.lang-uk.php
Executable file
25
mailer/language/phpmailer.lang-uk.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Ukrainian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Yuriy Rudyy <yrudyy@prs.net.ua>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається підєднатися до серверу SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправти наступним отрмувачам не вдалася: ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат email адреси: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка зєднання із SMTP-сервером';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: ';
|
||||
25
mailer/language/phpmailer.lang-vi.php
Executable file
25
mailer/language/phpmailer.lang-vi.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Vietnamese (Tiếng Việt) PHPMailer language file: refer to English translation for definitive list.
|
||||
* @package PHPMailer
|
||||
* @author VINADES.,JSC <contact@vinades.vn>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Không có nội dung';
|
||||
$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Không thực hiện được: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: ';
|
||||
26
mailer/language/phpmailer.lang-zh.php
Executable file
26
mailer/language/phpmailer.lang-zh.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Traditional Chinese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author liqwei <liqwei@liqwei.com>
|
||||
* @author Peter Dave Hello <@PeterDaveHello/>
|
||||
*/
|
||||
|
||||
$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['file_access'] = '無法存取檔案:';
|
||||
$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:';
|
||||
$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
|
||||
$PHPMAILER_LANG['execute'] = '無法執行:';
|
||||
$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。';
|
||||
$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: ';
|
||||
$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:';
|
||||
$PHPMAILER_LANG['signing'] = '登入失敗: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP連線失敗';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP伺服器錯誤: ';
|
||||
$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: ';
|
||||
26
mailer/language/phpmailer.lang-zh_cn.php
Executable file
26
mailer/language/phpmailer.lang-zh_cn.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Simplified Chinese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author liqwei <liqwei@liqwei.com>
|
||||
* @author young <masxy@foxmail.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'] = '发送地址错误:';
|
||||
$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
|
||||
$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||
$PHPMAILER_LANG['signing'] = '登录失败:';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错: ';
|
||||
$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';
|
||||
34
mailer/test.php
Executable file
34
mailer/test.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
require 'PHPMailerAutoload.php';
|
||||
|
||||
$mail = new PHPMailer;
|
||||
|
||||
$mail->isSMTP(); // Set mailer to use SMTP
|
||||
$mail->Host = 'smtp.gmail.com'; // Specify main and backup server
|
||||
$mail->SMTPAuth = true; // Enable SMTP authentication
|
||||
$mail->Username = 'outtervision@gmail.com'; // SMTP username
|
||||
$mail->Password = ''; // SMTP password
|
||||
$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
|
||||
$mail->Port = 587; //Set the SMTP port number - 587 for authenticated TLS
|
||||
$mail->setFrom('status@haba.pl', 'Amit Agarwal'); //Set who the message is to be sent from
|
||||
$mail->addAddress('outtervision@gmail.com', 'Josh Adams'); // Add a recipient
|
||||
|
||||
$mail->WordWrap = 50; // Set word wrap to 50 characters
|
||||
|
||||
$mail->isHTML(true); // Set email format to HTML
|
||||
|
||||
$mail->Subject = 'Here is the subject';
|
||||
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
|
||||
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
|
||||
|
||||
//Read an HTML message body from an external file, convert referenced images to embedded,
|
||||
//convert HTML into a basic plain-text alternative body
|
||||
//$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));
|
||||
|
||||
if(!$mail->send()) {
|
||||
echo 'Message could not be sent.';
|
||||
echo 'Mailer Error: ' . $mail->ErrorInfo;
|
||||
exit;
|
||||
}
|
||||
|
||||
echo 'Message has been sent';
|
||||
5
mailer/test/bootstrap.php
Executable file
5
mailer/test/bootstrap.php
Executable file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
require_once 'vendor/autoload.php';
|
||||
spl_autoload_register(function ($class) {
|
||||
require_once strtr($class, '\\_', '//').'.php';
|
||||
});
|
||||
76
mailer/test/phpmailerLangTest.php
Executable file
76
mailer/test/phpmailerLangTest.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer - language file tests
|
||||
* Requires PHPUnit 3.3 or later.
|
||||
*
|
||||
* PHP version 5.0.0
|
||||
*
|
||||
* @package PHPMailer
|
||||
* @author Andy Prevost
|
||||
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @copyright 2010 Marcus Bointon
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
*/
|
||||
|
||||
require_once '../PHPMailerAutoload.php';
|
||||
|
||||
/**
|
||||
* PHPMailer - PHP email transport unit test class
|
||||
* Performs authentication tests
|
||||
*/
|
||||
class PHPMailerLangTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Holds a phpmailer instance.
|
||||
* @private
|
||||
* @var PHPMailer
|
||||
*/
|
||||
public $Mail;
|
||||
|
||||
/**
|
||||
* @var string Default include path
|
||||
*/
|
||||
public $INCLUDE_DIR = '../';
|
||||
|
||||
/**
|
||||
* Run before each test is started.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->Mail = new PHPMailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test language files for missing and excess translations
|
||||
* All languages are compared with English
|
||||
* @group languages
|
||||
*/
|
||||
public function testTranslations()
|
||||
{
|
||||
$this->Mail->setLanguage('en');
|
||||
$definedStrings = $this->Mail->getTranslations();
|
||||
$err = '';
|
||||
foreach (new DirectoryIterator('../language') as $fileInfo) {
|
||||
if ($fileInfo->isDot()) {
|
||||
continue;
|
||||
}
|
||||
$matches = array();
|
||||
//Only look at language files, ignore anything else in there
|
||||
if (preg_match('/^phpmailer\.lang-([a-z_]{2,})\.php$/', $fileInfo->getFilename(), $matches)) {
|
||||
$lang = $matches[1]; //Extract language code
|
||||
$PHPMAILER_LANG = array(); //Language strings get put in here
|
||||
include $fileInfo->getPathname(); //Get language strings
|
||||
$missing = array_diff(array_keys($definedStrings), array_keys($PHPMAILER_LANG));
|
||||
$extra = array_diff(array_keys($PHPMAILER_LANG), array_keys($definedStrings));
|
||||
if (!empty($missing)) {
|
||||
$err .= "\nMissing translations in $lang: " . implode(', ', $missing);
|
||||
}
|
||||
if (!empty($extra)) {
|
||||
$err .= "\nExtra translations in $lang: " . implode(', ', $extra);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->assertEmpty($err, $err);
|
||||
}
|
||||
}
|
||||
1437
mailer/test/phpmailerTest.php
Executable file
1437
mailer/test/phpmailerTest.php
Executable file
File diff suppressed because it is too large
Load Diff
81
mailer/test/test_callback.php
Executable file
81
mailer/test/test_callback.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PHPMailer Lite - DKIM and Callback Function test</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
/* This is a sample callback function for PHPMailer Lite.
|
||||
* This callback function will echo the results of PHPMailer processing.
|
||||
*/
|
||||
|
||||
/* Callback (action) function
|
||||
* boolean $result result of the send action
|
||||
* string $to email address of the recipient
|
||||
* string $cc cc email addresses
|
||||
* string $bcc bcc email addresses
|
||||
* string $subject the subject
|
||||
* string $body the email body
|
||||
* @return boolean
|
||||
*/
|
||||
function callbackAction($result, $to, $cc, $bcc, $subject, $body)
|
||||
{
|
||||
/*
|
||||
this callback example echos the results to the screen - implement to
|
||||
post to databases, build CSV log files, etc., with minor changes
|
||||
*/
|
||||
$to = cleanEmails($to, 'to');
|
||||
$cc = cleanEmails($cc[0], 'cc');
|
||||
$bcc = cleanEmails($bcc[0], 'cc');
|
||||
echo $result . "\tTo: " . $to['Name'] . "\tTo: " . $to['Email'] . "\tCc: " . $cc['Name'] .
|
||||
"\tCc: " . $cc['Email'] . "\tBcc: " . $bcc['Name'] . "\tBcc: " . $bcc['Email'] .
|
||||
"\t" . $subject . "\n\n". $body . "\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
require_once '../class.phpmailer.php';
|
||||
$mail = new PHPMailer();
|
||||
|
||||
try {
|
||||
$mail->isMail();
|
||||
$mail->setFrom('you@example.com', 'Your Name');
|
||||
$mail->addAddress('another@example.com', 'John Doe');
|
||||
$mail->Subject = 'PHPMailer Test Subject';
|
||||
$mail->msgHTML(file_get_contents('../examples/contents.html'));
|
||||
// optional - msgHTML will create an alternate automatically
|
||||
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
|
||||
$mail->addAttachment('../examples/images/phpmailer.png'); // attachment
|
||||
$mail->addAttachment('../examples/images/phpmailer_mini.png'); // attachment
|
||||
$mail->action_function = 'callbackAction';
|
||||
$mail->send();
|
||||
echo "Message Sent OK</p>\n";
|
||||
} catch (phpmailerException $e) {
|
||||
echo $e->errorMessage(); //Pretty error messages from PHPMailer
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage(); //Boring error messages from anything else!
|
||||
}
|
||||
|
||||
function cleanEmails($str, $type)
|
||||
{
|
||||
if ($type == 'cc') {
|
||||
$addy['Email'] = $str[0];
|
||||
$addy['Name'] = $str[1];
|
||||
return $addy;
|
||||
}
|
||||
if (!strstr($str, ' <')) {
|
||||
$addy['Name'] = '';
|
||||
$addy['Email'] = $addy;
|
||||
return $addy;
|
||||
}
|
||||
$addyArr = explode(' <', $str);
|
||||
if (substr($addyArr[1], -1) == '>') {
|
||||
$addyArr[1] = substr($addyArr[1], 0, -1);
|
||||
}
|
||||
$addy['Name'] = $addyArr[0];
|
||||
$addy['Email'] = $addyArr[1];
|
||||
$addy['Email'] = str_replace('@', '@', $addy['Email']);
|
||||
return $addy;
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
7
mailer/test/testbootstrap-dist.php
Executable file
7
mailer/test/testbootstrap-dist.php
Executable file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$_REQUEST['submitted'] = 1;
|
||||
$_REQUEST['mail_to'] = 'somebody@example.com';
|
||||
$_REQUEST['mail_from'] = 'phpunit@example.com';
|
||||
$_REQUEST['mail_cc'] = 'cc@example.com';
|
||||
$_REQUEST['mail_host'] = 'localhost';
|
||||
$_REQUEST['mail_port'] = 2500;
|
||||
Reference in New Issue
Block a user