Merge remote-tracking branch 'upstream/master' into xoauth
# Conflicts: # class.phpmaileroauth.php # class.phpmaileroauthgoogle.php # class.smtp.php # examples/gmail_xoauth.phps # get_oauth_token.php
This commit is contained in:
commit
65244ee9dc
|
|
@ -1,5 +1,6 @@
|
|||
# ChangeLog
|
||||
|
||||
* Allow addresses with IDN (Internationalized Domain Name) in PHP 5.3+, thanks to @fbonzon
|
||||
* Allow access to POP3 errors
|
||||
* Make all POP3 private properties and methods protected
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -27,25 +27,25 @@ class PHPMailerOAuth extends PHPMailer
|
|||
{
|
||||
/**
|
||||
* The OAuth user's email address
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $oauthUserEmail = '';
|
||||
|
||||
/**
|
||||
* The OAuth refresh token
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $oauthRefreshToken = '';
|
||||
|
||||
/**
|
||||
* The OAuth client ID
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $oauthClientId = '';
|
||||
|
||||
/**
|
||||
* The OAuth client secret
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $oauthClientSecret = '';
|
||||
|
||||
|
|
@ -55,8 +55,7 @@ class PHPMailerOAuth extends PHPMailer
|
|||
* @access protected
|
||||
*/
|
||||
protected $oauth = null;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get an OAuth instance to use.
|
||||
* @return PHPMailerOAuthProvider
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
* @author Ravishanker Kusuma (hayageek@gmail.com)
|
||||
* @link https://github.com/hayageek
|
||||
*/
|
||||
|
||||
class PHPMailerOAuthGoogle extends PHPMailerOAuthProvider
|
||||
{
|
||||
public function getProvider() {
|
||||
|
|
|
|||
|
|
@ -31,28 +31,28 @@ class POP3
|
|||
{
|
||||
/**
|
||||
* The POP3 PHPMailer Version number.
|
||||
* @type string
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $Version = '5.2.13';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @access public
|
||||
*/
|
||||
public $POP3_PORT = 110;
|
||||
|
||||
/**
|
||||
* Default timeout in seconds.
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @access public
|
||||
*/
|
||||
public $POP3_TIMEOUT = 30;
|
||||
|
||||
/**
|
||||
* POP3 Carriage Return + Line Feed.
|
||||
* @type string
|
||||
* @var string
|
||||
* @access public
|
||||
* @deprecated Use the constant instead
|
||||
*/
|
||||
|
|
@ -61,63 +61,63 @@ class POP3
|
|||
/**
|
||||
* Debug display level.
|
||||
* Options: 0 = no, 1+ = yes
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @access public
|
||||
*/
|
||||
public $do_debug = 0;
|
||||
|
||||
/**
|
||||
* POP3 mail server hostname.
|
||||
* @type string
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $host;
|
||||
|
||||
/**
|
||||
* POP3 port number.
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @access public
|
||||
*/
|
||||
public $port;
|
||||
|
||||
/**
|
||||
* POP3 Timeout Value in seconds.
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @access public
|
||||
*/
|
||||
public $tval;
|
||||
|
||||
/**
|
||||
* POP3 username
|
||||
* @type string
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $username;
|
||||
|
||||
/**
|
||||
* POP3 password.
|
||||
* @type string
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $password;
|
||||
|
||||
/**
|
||||
* Resource handle for the POP3 connection socket.
|
||||
* @type resource
|
||||
* @var resource
|
||||
* @access protected
|
||||
*/
|
||||
protected $pop_conn;
|
||||
|
||||
/**
|
||||
* Are we connected?
|
||||
* @type boolean
|
||||
* @var boolean
|
||||
* @access protected
|
||||
*/
|
||||
protected $connected = false;
|
||||
|
||||
/**
|
||||
* Error container.
|
||||
* @type array
|
||||
* @var array
|
||||
* @access protected
|
||||
*/
|
||||
protected $errors = array();
|
||||
|
|
|
|||
|
|
@ -28,25 +28,25 @@ class SMTP
|
|||
{
|
||||
/**
|
||||
* The PHPMailer SMTP version number.
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '5.2.13';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
const CRLF = "\r\n";
|
||||
|
||||
/**
|
||||
* The SMTP port to use if one is not specified.
|
||||
* @type integer
|
||||
* @var integer
|
||||
*/
|
||||
const DEFAULT_SMTP_PORT = 25;
|
||||
|
||||
/**
|
||||
* The maximum line length allowed by RFC 2822 section 2.1.1
|
||||
* @type integer
|
||||
* @var integer
|
||||
*/
|
||||
const MAX_LINE_LENGTH = 998;
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ class SMTP
|
|||
|
||||
/**
|
||||
* The PHPMailer SMTP Version number.
|
||||
* @type string
|
||||
* @var string
|
||||
* @deprecated Use the `VERSION` constant instead
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
|
|
@ -85,7 +85,7 @@ class SMTP
|
|||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
* @type integer
|
||||
* @var integer
|
||||
* @deprecated This is only ever used as a default value, so use the `DEFAULT_SMTP_PORT` constant instead
|
||||
* @see SMTP::DEFAULT_SMTP_PORT
|
||||
*/
|
||||
|
|
@ -93,7 +93,7 @@ class SMTP
|
|||
|
||||
/**
|
||||
* SMTP reply line ending.
|
||||
* @type string
|
||||
* @var string
|
||||
* @deprecated Use the `CRLF` constant instead
|
||||
* @see SMTP::CRLF
|
||||
*/
|
||||
|
|
@ -107,7 +107,7 @@ class SMTP
|
|||
* * 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
|
||||
* @var integer
|
||||
*/
|
||||
public $do_debug = self::DEBUG_OFF;
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class SMTP
|
|||
* <code>
|
||||
* $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
|
||||
* </code>
|
||||
* @type string|callable
|
||||
* @var string|callable
|
||||
*/
|
||||
public $Debugoutput = 'echo';
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ class SMTP
|
|||
* 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
|
||||
* @var boolean
|
||||
*/
|
||||
public $do_verp = false;
|
||||
|
||||
|
|
@ -139,26 +139,26 @@ class SMTP
|
|||
* 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
|
||||
* @var 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
|
||||
* @var integer
|
||||
*/
|
||||
public $Timelimit = 300;
|
||||
|
||||
/**
|
||||
* The socket for the server connection.
|
||||
* @type resource
|
||||
* @var resource
|
||||
*/
|
||||
protected $smtp_conn;
|
||||
|
||||
/**
|
||||
* Error information, if any, for the last SMTP command.
|
||||
* @type array
|
||||
* @var array
|
||||
*/
|
||||
protected $error = array(
|
||||
'error' => '',
|
||||
|
|
@ -170,7 +170,7 @@ class SMTP
|
|||
/**
|
||||
* The reply the server sent to us for HELO.
|
||||
* If null, no HELO string has yet been received.
|
||||
* @type string|null
|
||||
* @var string|null
|
||||
*/
|
||||
protected $helo_rply = null;
|
||||
|
||||
|
|
@ -181,13 +181,13 @@ class SMTP
|
|||
* represents the server name. In case of HELO it is the only element of the array.
|
||||
* Other values can be boolean TRUE or an array containing extension options.
|
||||
* If null, no HELO/EHLO string has yet been received.
|
||||
* @type array|null
|
||||
* @var array|null
|
||||
*/
|
||||
protected $server_caps = null;
|
||||
|
||||
/**
|
||||
* The most recent reply received from the server.
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
protected $last_reply = '';
|
||||
|
||||
|
|
@ -841,9 +841,9 @@ class SMTP
|
|||
|
||||
/**
|
||||
* 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 $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
|
||||
* @param integer|array $expect One or more expected integer success codes
|
||||
* @access protected
|
||||
* @return boolean True on success.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,88 +1,87 @@
|
|||
<?php
|
||||
/**
|
||||
* This example shows settings to use when sending via Google's Gmail servers.
|
||||
*/
|
||||
|
||||
//SMTP needs accurate times, and the PHP time zone MUST be set
|
||||
//This should be done in your php.ini, but this is how to do it if you don't have access to that
|
||||
date_default_timezone_set('Etc/UTC');
|
||||
|
||||
require '../PHPMailerAutoload.php';
|
||||
|
||||
|
||||
//Load dependnecies from composer
|
||||
//If this causes an error, run 'composer install'
|
||||
require '../vendor/autoload.php';
|
||||
|
||||
//Create a new PHPMailerOAuthGoogle instance
|
||||
$mail = new PHPMailerOAuthGoogle;
|
||||
|
||||
//Tell PHPMailer to use SMTP
|
||||
$mail->isSMTP();
|
||||
|
||||
//Enable SMTP debugging
|
||||
// 0 = off (for production use)
|
||||
// 1 = client messages
|
||||
// 2 = client and server messages
|
||||
$mail->SMTPDebug = 0;
|
||||
|
||||
//Ask for HTML-friendly debug output
|
||||
$mail->Debugoutput = 'html';
|
||||
|
||||
//Set the hostname of the mail server
|
||||
$mail->Host = 'smtp.gmail.com';
|
||||
|
||||
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
|
||||
$mail->Port = 587;
|
||||
|
||||
//Set the encryption system to use - ssl (deprecated) or tls
|
||||
$mail->SMTPSecure = 'tls';
|
||||
|
||||
//Whether to use SMTP authentication
|
||||
$mail->SMTPAuth = true;
|
||||
|
||||
//Set AuthType
|
||||
$mail->AuthType = 'XOAUTH2';
|
||||
|
||||
//User Email to use for SMTP authentication - Who authorised to access Google mail
|
||||
$mail->oauthUserEmail = "sender@gmail.com";
|
||||
|
||||
|
||||
//Obtained From Google Developer Console
|
||||
$mail->oauthClientId = "{YOUR_APP_CLIENT_ID}";
|
||||
|
||||
//Obtained From Google Developer Console
|
||||
$mail->oauthClientSecret = "{YOUR_APP_CLIENT_SECRET}";
|
||||
|
||||
//Obtained By running get_oauth_token.php after setting up APP in Google Developer Console.
|
||||
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
|
||||
// eg: http://localhost/phpmail/get_oauth_token.php
|
||||
$mail->oauthRefreshToken = "{OAUTH_TOKEN_FROM_GOOGLE}";
|
||||
|
||||
|
||||
//Set who the message is to be sent from
|
||||
//For gmail, this generally needs to be the same as the user you logged in as
|
||||
$mail->setFrom('sender@gmail.com', 'test test');
|
||||
|
||||
//Set who the message is to be sent to
|
||||
$mail->addAddress('receiver@test.com', 'test test');
|
||||
|
||||
//Set the subject line
|
||||
$mail->Subject = 'PHPMailer GMail SMTP test.Gmail';
|
||||
|
||||
//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__));
|
||||
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
|
||||
//Attach an image file
|
||||
$mail->addAttachment('images/phpmailer_mini.png');
|
||||
|
||||
//send the message, check for errors
|
||||
if (!$mail->send()) {
|
||||
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||
} else {
|
||||
echo "Message sent!";
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* This example shows settings to use when sending via Google's Gmail servers.
|
||||
*/
|
||||
|
||||
//SMTP needs accurate times, and the PHP time zone MUST be set
|
||||
//This should be done in your php.ini, but this is how to do it if you don't have access to that
|
||||
date_default_timezone_set('Etc/UTC');
|
||||
|
||||
require '../PHPMailerAutoload.php';
|
||||
|
||||
//Load dependencies from composer
|
||||
//If this causes an error, run 'composer install'
|
||||
require '../vendor/autoload.php';
|
||||
|
||||
//Create a new PHPMailerOAuthGoogle instance
|
||||
$mail = new PHPMailerOAuthGoogle;
|
||||
|
||||
//Tell PHPMailer to use SMTP
|
||||
$mail->isSMTP();
|
||||
|
||||
//Enable SMTP debugging
|
||||
// 0 = off (for production use)
|
||||
// 1 = client messages
|
||||
// 2 = client and server messages
|
||||
$mail->SMTPDebug = 0;
|
||||
|
||||
//Ask for HTML-friendly debug output
|
||||
$mail->Debugoutput = 'html';
|
||||
|
||||
//Set the hostname of the mail server
|
||||
$mail->Host = 'smtp.gmail.com';
|
||||
|
||||
//Set the SMTP port number - 587 for authenticated TLS, a.k.a. RFC4409 SMTP submission
|
||||
$mail->Port = 587;
|
||||
|
||||
//Set the encryption system to use - ssl (deprecated) or tls
|
||||
$mail->SMTPSecure = 'tls';
|
||||
|
||||
//Whether to use SMTP authentication
|
||||
$mail->SMTPAuth = true;
|
||||
|
||||
//Set AuthType
|
||||
$mail->AuthType = 'XOAUTH2';
|
||||
|
||||
//User Email to use for SMTP authentication - Who authorised to access Google mail
|
||||
$mail->oauthUserEmail = "sender@gmail.com";
|
||||
|
||||
|
||||
//Obtained From Google Developer Console
|
||||
$mail->oauthClientId = "{YOUR_APP_CLIENT_ID}";
|
||||
|
||||
//Obtained From Google Developer Console
|
||||
$mail->oauthClientSecret = "{YOUR_APP_CLIENT_SECRET}";
|
||||
|
||||
//Obtained By running get_oauth_token.php after setting up APP in Google Developer Console.
|
||||
//Set Redirect URI in Developer Console as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
|
||||
// eg: http://localhost/phpmail/get_oauth_token.php
|
||||
$mail->oauthRefreshToken = "{OAUTH_TOKEN_FROM_GOOGLE}";
|
||||
|
||||
|
||||
//Set who the message is to be sent from
|
||||
//For gmail, this generally needs to be the same as the user you logged in as
|
||||
$mail->setFrom('sender@gmail.com', 'test test');
|
||||
|
||||
//Set who the message is to be sent to
|
||||
$mail->addAddress('whoto@example.com', 'John Doe');
|
||||
|
||||
//Set the subject line
|
||||
$mail->Subject = 'PHPMailer GMail SMTP test';
|
||||
|
||||
//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__));
|
||||
|
||||
//Replace the plain text body with one created manually
|
||||
$mail->AltBody = 'This is a plain-text message body';
|
||||
|
||||
//Attach an image file
|
||||
$mail->addAttachment('images/phpmailer_mini.png');
|
||||
|
||||
//send the message, check for errors
|
||||
if (!$mail->send()) {
|
||||
echo "Mailer Error: " . $mail->ErrorInfo;
|
||||
} else {
|
||||
echo "Message sent!";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ class EasyPeasyICS
|
|||
{
|
||||
/**
|
||||
* The name of the calendar
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
protected $calendarName;
|
||||
/**
|
||||
* The array of events to add to this calendar
|
||||
* @type array
|
||||
* @var array
|
||||
*/
|
||||
protected $events = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,18 +5,14 @@
|
|||
* as [https/http]://<yourdomain>/<folder>/get_oauth_token.php
|
||||
* e.g.: http://localhost/phpmail/get_oauth_token.php
|
||||
* * Ensure dependencies are installed with 'composer install'
|
||||
* * Set up an app in your Google/Yahoo/Microsoft
|
||||
* * Set up an app in your Google/Yahoo/Microsoft account
|
||||
* * Set the script address as the app's redirect URL
|
||||
* If no refresh token is obtained when running this file, revoke access to your app
|
||||
* using link: https://accounts.google.com/b/0/IssuedAuthSubTokens and run the script again.
|
||||
* This script requires PHP 5.4 or later
|
||||
* PHP Version 5.4.
|
||||
* PHP Version 5.4
|
||||
*/
|
||||
require 'vendor/autoload.php';
|
||||
require 'class.phpmaileroauthprovider.php';
|
||||
require 'class.phpmaileroauthgoogle.php';
|
||||
require 'class.phpmaileroauthyahoo.php';
|
||||
require 'class.phpmaileroauthmicrosoft.php';
|
||||
|
||||
session_start();
|
||||
|
||||
|
|
@ -52,7 +48,7 @@ if ($provider_name == 'google') {
|
|||
$options['scope'] = array(
|
||||
'https://mail.google.com/'
|
||||
);
|
||||
|
||||
|
||||
//To get the refresh token everytime
|
||||
$options['approval_prompt'] = 'force';
|
||||
} elseif ($provider_name == 'yahoo') {
|
||||
|
|
@ -67,7 +63,7 @@ if ($provider_name == 'google') {
|
|||
'clientSecret' => '{MICROSOFT_APP_SECRET}',
|
||||
'redirectUri' => $redirectUri
|
||||
));
|
||||
|
||||
|
||||
//scopes
|
||||
$options['scope'] = array(
|
||||
'wl.imap',
|
||||
|
|
@ -79,34 +75,33 @@ if ($provider_name == 'google') {
|
|||
}
|
||||
|
||||
if (!isset($_GET['code'])) {
|
||||
|
||||
// If we don't have an authorization code then get one
|
||||
$authUrl = $provider->getAuthorizationUrl($options);
|
||||
|
||||
|
||||
// echo $authUrl."<br>";
|
||||
$_SESSION['oauth2state'] = $provider->getState();
|
||||
|
||||
|
||||
header('Location: ' . $authUrl);
|
||||
exit;
|
||||
// Check given state against previously stored one to mitigate CSRF attack
|
||||
// Check given state against previously stored one to mitigate CSRF attack
|
||||
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
|
||||
unset($_SESSION['oauth2state']);
|
||||
unset($_SESSION['provider_name']);
|
||||
exit('Invalid state');
|
||||
} else {
|
||||
unset($_SESSION['provider_name']);
|
||||
|
||||
|
||||
// Try to get an access token (using the authorization code grant)
|
||||
$token = $provider->getAccessToken('authorization_code', array(
|
||||
'code' => $_GET['code']
|
||||
));
|
||||
|
||||
|
||||
// Use this to interact with an API on the users behalf
|
||||
echo 'Token: ' . $token->getToken() . '<br>';
|
||||
|
||||
|
||||
// Use this to get a new access token if the old one expires
|
||||
echo 'Refresh Token: ' . $token->getRefreshToken() . '<br>';
|
||||
|
||||
|
||||
// Number of seconds until the access token will expire, and need refreshing
|
||||
echo 'Expires:' . $token->getExpires() . '<br>';
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف
|
|||
$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'Няма достъп до файл:
|
|||
$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['invalid_address'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $PHPMAILER_LANG['file_access'] = 'Zugriff auf folgende Datei fehlgeschl
|
|||
$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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['invalid_address'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλαση
|
|||
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτω διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'Seuraavaan tiedostoon ei ole oikeuksi
|
|||
$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['invalid_address'] = 'Invalid address: ';
|
||||
$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.';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['invalid_address'] = 'Invalid address: ';
|
||||
$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: ';
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ $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['invalid_address'] = 'כתובת שגויה: ';
|
||||
$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: ';
|
||||
$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: ';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ $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['invalid_address'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = '파일 접근 불가: ';
|
|||
$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: ';
|
||||
$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다';
|
||||
$PHPMAILER_LANG['invalid_address'] = '잘못된 주소';
|
||||
$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.';
|
||||
$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: ';
|
|||
$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['invalid_address'] = 'Invalid address: ';
|
||||
$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: ';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @package PHPMailer
|
||||
* @author Klemen Tušar <techouse@gmail.com>
|
||||
*/
|
||||
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Ne morem vzpostaviti povezave s SMTP gostiteljem.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.';
|
||||
|
|
@ -15,7 +15,7 @@ $PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: ';
|
|||
$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ $PHPMAILER_LANG['file_open'] = 'Није могуће отворит
|
|||
$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Потребно је задати најмање једну адресу.';
|
||||
$PHPMAILER_LANG['signing'] = 'Грешка приликом пријављивања: ';
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ $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['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: ';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ $PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
|||
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
|
||||
$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
|
||||
$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。';
|
||||
$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||
|
|
|
|||
|
|
@ -24,40 +24,40 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* Holds the default phpmailer instance.
|
||||
* @private
|
||||
* @type PHPMailer
|
||||
* @var PHPMailer
|
||||
*/
|
||||
public $Mail;
|
||||
|
||||
/**
|
||||
* Holds the SMTP mail host.
|
||||
* @public
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $Host = '';
|
||||
|
||||
/**
|
||||
* Holds the change log.
|
||||
* @private
|
||||
* @type string[]
|
||||
* @var string[]
|
||||
*/
|
||||
public $ChangeLog = array();
|
||||
|
||||
/**
|
||||
* Holds the note log.
|
||||
* @private
|
||||
* @type string[]
|
||||
* @var string[]
|
||||
*/
|
||||
public $NoteLog = array();
|
||||
|
||||
/**
|
||||
* Default include path
|
||||
* @type string
|
||||
* @var string
|
||||
*/
|
||||
public $INCLUDE_DIR = '../';
|
||||
|
||||
/**
|
||||
* PIDs of any processes we need to kill
|
||||
* @type array
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
private $pids = array();
|
||||
|
|
@ -107,7 +107,6 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
|
|||
$this->Mail->Mailer = 'smtp';
|
||||
} else {
|
||||
$this->Mail->Mailer = 'mail';
|
||||
$this->Mail->Sender = 'unit_test@phpmailer.example.com';
|
||||
}
|
||||
if (array_key_exists('mail_to', $_REQUEST)) {
|
||||
$this->setAddress($_REQUEST['mail_to'], 'Test User', 'to');
|
||||
|
|
@ -468,7 +467,7 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
|
|||
'first.last@[IPv6:a1::b2:11.22.33.44]',
|
||||
'test@test.com',
|
||||
'test@xn--example.com',
|
||||
'test@example.com'
|
||||
'test@example.com',
|
||||
);
|
||||
$invalidaddresses = array(
|
||||
'first.last@sub.do,com',
|
||||
|
|
@ -608,16 +607,27 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
|
|||
'first.last@[IPv6::a2::b4]',
|
||||
'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]',
|
||||
'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]',
|
||||
'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]'
|
||||
'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]',
|
||||
);
|
||||
// IDNs in Unicode and ASCII forms.
|
||||
$unicodeaddresses = array(
|
||||
'first.last@bücher.ch',
|
||||
'first.last@кто.рф',
|
||||
'first.last@phplíst.com',
|
||||
);
|
||||
$asciiaddresses = array(
|
||||
'first.last@xn--bcher-kva.ch',
|
||||
'first.last@xn--j1ail.xn--p1ai',
|
||||
'first.last@xn--phplst-6va.com',
|
||||
);
|
||||
$goodfails = array();
|
||||
foreach ($validaddresses as $address) {
|
||||
foreach (array_merge($validaddresses, $asciiaddresses) as $address) {
|
||||
if (!PHPMailer::validateAddress($address)) {
|
||||
$goodfails[] = $address;
|
||||
}
|
||||
}
|
||||
$badpasses = array();
|
||||
foreach ($invalidaddresses as $address) {
|
||||
foreach (array_merge($invalidaddresses, $unicodeaddresses) as $address) {
|
||||
if (PHPMailer::validateAddress($address)) {
|
||||
$badpasses[] = $address;
|
||||
}
|
||||
|
|
@ -1910,6 +1920,128 @@ EOT;
|
|||
array('Content-Type', ' application/json')
|
||||
), $this->Mail->getCustomHeaders());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests setting and retrieving ConfirmReadingTo address, also known as "read receipt" address.
|
||||
*/
|
||||
public function testConfirmReadingTo()
|
||||
{
|
||||
$this->Mail->CharSet = 'utf-8';
|
||||
$this->buildBody();
|
||||
|
||||
$this->Mail->ConfirmReadingTo = 'test@example..com'; //Invalid address
|
||||
$this->assertFalse($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
|
||||
$this->Mail->ConfirmReadingTo = ' test@example.com'; //Extra space to trim
|
||||
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
$this->assertEquals(
|
||||
'test@example.com',
|
||||
$this->Mail->ConfirmReadingTo,
|
||||
'Unexpected read receipt address');
|
||||
|
||||
$this->Mail->ConfirmReadingTo = 'test@françois.ch'; //Address with IDN
|
||||
if ($this->Mail->idnSupported()) {
|
||||
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
$this->assertEquals(
|
||||
'test@xn--franois-xxa.ch',
|
||||
$this->Mail->ConfirmReadingTo,
|
||||
'IDN address not converted to punycode');
|
||||
} else {
|
||||
$this->assertFalse($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests CharSet and Unicode -> ASCII conversions for addresses with IDN.
|
||||
*/
|
||||
public function testConvertEncoding()
|
||||
{
|
||||
if (!$this->Mail->idnSupported()) {
|
||||
$this->markTestSkipped('intl and/or mbstring extensions are not available');
|
||||
}
|
||||
|
||||
$this->Mail->clearAllRecipients();
|
||||
$this->Mail->clearReplyTos();
|
||||
|
||||
// This file is UTF-8 encoded. Create a domain encoded in "iso-8859-1".
|
||||
$domain = '@' . mb_convert_encoding('françois.ch', 'ISO-8859-1', 'UTF-8');
|
||||
$this->Mail->addAddress('test' . $domain);
|
||||
$this->Mail->addCC('test+cc' . $domain);
|
||||
$this->Mail->addBCC('test+bcc' . $domain);
|
||||
$this->Mail->addReplyTo('test+replyto' . $domain);
|
||||
|
||||
// Queued addresses are not returned by get*Addresses() before send() call.
|
||||
$this->assertEmpty($this->Mail->getToAddresses(), 'Bad "to" recipients');
|
||||
$this->assertEmpty($this->Mail->getCcAddresses(), 'Bad "cc" recipients');
|
||||
$this->assertEmpty($this->Mail->getBccAddresses(), 'Bad "bcc" recipients');
|
||||
$this->assertEmpty($this->Mail->getReplyToAddresses(), 'Bad "reply-to" recipients');
|
||||
|
||||
// Clear queued BCC recipient.
|
||||
$this->Mail->clearBCCs();
|
||||
|
||||
$this->buildBody();
|
||||
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
|
||||
// Addresses with IDN are returned by get*Addresses() after send() call.
|
||||
$domain = $this->Mail->punyencodeAddress($domain);
|
||||
$this->assertEquals(
|
||||
array(array('test' . $domain, '')),
|
||||
$this->Mail->getToAddresses(),
|
||||
'Bad "to" recipients');
|
||||
$this->assertEquals(
|
||||
array(array('test+cc' . $domain, '')),
|
||||
$this->Mail->getCcAddresses(),
|
||||
'Bad "cc" recipients');
|
||||
$this->assertEmpty($this->Mail->getBccAddresses(), 'Bad "bcc" recipients');
|
||||
$this->assertEquals(
|
||||
array('test+replyto' . $domain => array('test+replyto' . $domain, '')),
|
||||
$this->Mail->getReplyToAddresses(),
|
||||
'Bad "reply-to" addresses');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests removal of duplicate recipients and reply-tos.
|
||||
*/
|
||||
public function testDuplicateIDNRemoved()
|
||||
{
|
||||
if (!$this->Mail->idnSupported()) {
|
||||
$this->markTestSkipped('intl and/or mbstring extensions are not available');
|
||||
}
|
||||
|
||||
$this->Mail->clearAllRecipients();
|
||||
$this->Mail->clearReplyTos();
|
||||
|
||||
$this->Mail->CharSet = 'utf-8';
|
||||
|
||||
$this->assertTrue($this->Mail->addAddress('test@françois.ch'));
|
||||
$this->assertFalse($this->Mail->addAddress('test@françois.ch'));
|
||||
$this->assertTrue($this->Mail->addAddress('test@FRANÇOIS.CH'));
|
||||
$this->assertFalse($this->Mail->addAddress('test@FRANÇOIS.CH'));
|
||||
$this->assertTrue($this->Mail->addAddress('test@xn--franois-xxa.ch'));
|
||||
$this->assertFalse($this->Mail->addAddress('test@xn--franois-xxa.ch'));
|
||||
$this->assertFalse($this->Mail->addAddress('test@XN--FRANOIS-XXA.CH'));
|
||||
|
||||
$this->assertTrue($this->Mail->addReplyTo('test+replyto@françois.ch'));
|
||||
$this->assertFalse($this->Mail->addReplyTo('test+replyto@françois.ch'));
|
||||
$this->assertTrue($this->Mail->addReplyTo('test+replyto@FRANÇOIS.CH'));
|
||||
$this->assertFalse($this->Mail->addReplyTo('test+replyto@FRANÇOIS.CH'));
|
||||
$this->assertTrue($this->Mail->addReplyTo('test+replyto@xn--franois-xxa.ch'));
|
||||
$this->assertFalse($this->Mail->addReplyTo('test+replyto@xn--franois-xxa.ch'));
|
||||
$this->assertFalse($this->Mail->addReplyTo('test+replyto@XN--FRANOIS-XXA.CH'));
|
||||
|
||||
$this->buildBody();
|
||||
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
|
||||
|
||||
// There should be only one "To" address and one "Reply-To" address.
|
||||
$this->assertEquals(
|
||||
1,
|
||||
count($this->Mail->getToAddresses()),
|
||||
'Bad count of "to" recipients');
|
||||
$this->assertEquals(
|
||||
1,
|
||||
count($this->Mail->getReplyToAddresses()),
|
||||
'Bad count of "reply-to" addresses');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
# Run the fake pop server from bash
|
||||
# Idea from http://blog.ale-re.net/2007/09/ipersimple-remote-shell-with-netcat.html
|
||||
# Defaults to port 1100 so it can be run by unpriv users and not clash with a real server
|
||||
# Optionally, pass in in a port number as the first arg
|
||||
# Optionally, pass in a port number as the first arg
|
||||
|
||||
mkfifo fifo
|
||||
nc -l ${1:-1100} <fifo |bash ./fakepopserver.sh >fifo
|
||||
rm fifo
|
||||
rm fifo
|
||||
|
|
|
|||
Loading…
Reference in New Issue