0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 18:03:04 +02:00

Merge pull request #497 from fbonzon/patch1

Update French translation, minor changes
This commit is contained in:
Marcus Bointon 2015-09-15 08:09:22 +02:00
commit 20b705353a
4 changed files with 21 additions and 18 deletions

23
class.phpmailer.php Normal file → Executable file
View File

@ -444,7 +444,7 @@ class PHPMailer
* @type string
*/
public $XMailer = '';
/**
* Only For XOAUTH - Google
* Options: An empty string for PHPMailer default, Enter the email used to get access token
@ -454,8 +454,8 @@ class PHPMailer
// public $RefreshToken = '';
// public $ClientId = '';
// public $ClientSecret = '';
/**
* An instance of the SMTP sender class.
* @type SMTP
@ -1384,7 +1384,7 @@ class PHPMailer
if (is_null($this->smtp)) {
$this->smtp = $this->getSMTPInstance();
}
// Already connected?
if ($this->smtp->connected()) {
return true;
@ -1459,10 +1459,10 @@ class PHPMailer
}
if ($this->SMTPAuth) {
if (!$this->smtp->authenticate(
$this->Username,
$this->Password,
$this->AuthType,
$this->Realm,
$this->Username,
$this->Password,
$this->AuthType,
$this->Realm,
$this->Workstation
)
) {
@ -1844,7 +1844,7 @@ class PHPMailer
if ($this->XMailer == '') {
$result .= $this->headerLine(
'X-Mailer',
'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer/)'
'PHPMailer ' . $this->Version . ' (https://github.com/PHPMailer/PHPMailer)'
);
} else {
$myXmailer = trim($this->XMailer);
@ -3613,7 +3613,10 @@ class PHPMailer
"\tbh=" . $DKIMb64 . ";\r\n" .
"\tb=";
$toSign = $this->DKIM_HeaderC(
$from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs
$from_header . "\r\n" .
$to_header . "\r\n" .
$subject_header . "\r\n" .
$dkimhdrs
);
$signed = $this->DKIM_Sign($toSign);
return $dkimhdrs . $signed . "\r\n";

6
class.phpmaileroauth.php Normal file → Executable file
View File

@ -55,7 +55,7 @@ class PHPMailerOAuth extends PHPMailer
* @access protected
*/
protected $oauth = null;
/**
* Get an OAuth instance to use.
* @return OAuth
@ -87,11 +87,11 @@ class PHPMailerOAuth extends PHPMailer
if (is_null($this->smtp)) {
$this->smtp = $this->getSMTPInstance();
}
if (is_null($this->oauth)) {
$this->oauth = $this->getOAUTHInstance();
}
// Already connected?
if ($this->smtp->connected()) {
return true;

8
class.phpmaileroauthgoogle.php Normal file → Executable file
View File

@ -30,7 +30,7 @@ class PHPMailerOAuthGoogle
private $oauthRefreshToken = '';
private $oauthClientId = '';
private $oauthClientSecret = '';
public function __construct(
$UserEmail,
$ClientSecret,
@ -49,19 +49,19 @@ class PHPMailerOAuthGoogle
'clientSecret' => $this->oauthClientSecret
]);
}
private function getGrant()
{
return new \League\OAuth2\Client\Grant\RefreshToken();
}
private function getToken()
{
$provider = $this->getProvider();
$grant = $this->getGrant();
return $provider->getAccessToken($grant, ['refresh_token' => $this->oauthRefreshToken]);
}
public function getOauth64()
{
$token = $this->getToken();

2
language/phpmailer.lang-fr.php Normal file → Executable file
View File

@ -26,4 +26,4 @@ $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: ';
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante: ';