[Web] Update composer libs
- Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8)
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
|
||||
# PHPMailer – A full-featured email creation and transfer class for PHP
|
||||
|
||||
[](https://github.com/PHPMailer/PHPMailer/actions) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://phpmailer.github.io/PHPMailer/)
|
||||
[](https://github.com/PHPMailer/PHPMailer/actions)
|
||||
[](https://codecov.io/gh/PHPMailer/PHPMailer)
|
||||
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||
[](https://packagist.org/packages/phpmailer/phpmailer)
|
||||
[](https://phpmailer.github.io/PHPMailer/)
|
||||
|
||||
## Features
|
||||
- Probably the world's most popular code for sending email from PHP!
|
||||
@@ -17,7 +22,7 @@
|
||||
- Protects against header injection attacks
|
||||
- Error messages in over 50 languages!
|
||||
- DKIM and S/MIME signing support
|
||||
- Compatible with PHP 5.5 and later, including PHP 8.0
|
||||
- Compatible with PHP 5.5 and later, including PHP 8.1
|
||||
- Namespaced to prevent name clashes
|
||||
- Much more!
|
||||
|
||||
@@ -39,7 +44,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg
|
||||
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
||||
|
||||
```json
|
||||
"phpmailer/phpmailer": "^6.2"
|
||||
"phpmailer/phpmailer": "^6.5"
|
||||
```
|
||||
|
||||
or run
|
||||
@@ -89,7 +94,7 @@ use PHPMailer\PHPMailer\Exception;
|
||||
//Load Composer's autoloader
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
//Instantiation and passing `true` enables exceptions
|
||||
//Create an instance; passing `true` enables exceptions
|
||||
$mail = new PHPMailer(true);
|
||||
|
||||
try {
|
||||
@@ -100,8 +105,8 @@ try {
|
||||
$mail->SMTPAuth = true; //Enable SMTP authentication
|
||||
$mail->Username = 'user@example.com'; //SMTP username
|
||||
$mail->Password = 'secret'; //SMTP password
|
||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
|
||||
$mail->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
|
||||
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; //Enable implicit TLS encryption
|
||||
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
|
||||
|
||||
//Recipients
|
||||
$mail->setFrom('from@example.com', 'Mailer');
|
||||
|
@@ -1 +1 @@
|
||||
6.5.0
|
||||
6.6.0
|
@@ -25,6 +25,11 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"ext-ctype": "*",
|
||||
@@ -34,10 +39,12 @@
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"php-parallel-lint/php-console-highlighter": "^0.5.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.1",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.5.6",
|
||||
"yoast/phpunit-polyfills": "^0.2.0"
|
||||
"squizlabs/php_codesniffer": "^3.6.2",
|
||||
"yoast/phpunit-polyfills": "^1.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses",
|
||||
@@ -60,6 +67,10 @@
|
||||
"license": "LGPL-2.1-only",
|
||||
"scripts": {
|
||||
"check": "./vendor/bin/phpcs",
|
||||
"test": "./vendor/bin/phpunit"
|
||||
"test": "./vendor/bin/phpunit --no-coverage",
|
||||
"coverage": "./vendor/bin/phpunit",
|
||||
"lint": [
|
||||
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php,phps --exclude vendor --exclude .git --exclude build"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -9,24 +9,30 @@
|
||||
* @see http://unicode.org/udhr/n/notes_fra.html
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l\'authentification.';
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l’authentification.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à l’envoi par SMTP, désactivez l’option mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.';
|
||||
$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['execute'] = 'Impossible de lancer l’exécution : ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : ';
|
||||
$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['invalid_hostentry'] = 'L\'entrée hôte n\'est pas valide : ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'L\'hôte n\'est pas valide : ';
|
||||
$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'] = 'Adresse courriel non valide : ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Nom ou valeur de l’en-tête non valide';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Entrée d’hôte non valide : ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Hôte non 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['recipients_failed'] = 'Erreur SMTP : les destinataires suivants ont échoué : ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP : ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP : ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échouée.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Détails : ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de réinitialiser une variable : ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : ';
|
||||
|
@@ -5,24 +5,25 @@
|
||||
* @package PHPMailer
|
||||
* @author Mitsuhiro Yoshida <http://mitstek.com/>
|
||||
* @author Yoshi Sakai <http://bluemooninc.jp/>
|
||||
* @author Arisophy <https://github.com/arisophy/>
|
||||
*/
|
||||
|
||||
$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['empty_message'] = 'メール本文が空です。';
|
||||
$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'] = 'Invalid address: ';
|
||||
$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: ';
|
||||
$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: ';
|
||||
//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
|
||||
$PHPMAILER_LANG['signing'] = '署名エラー: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: ';
|
||||
$PHPMAILER_LANG['variable_set'] = '変数が存在しません: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: ';
|
||||
|
@@ -7,23 +7,28 @@
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'PHP versie gededecteerd die onderhavig is aan een bug die kan resulteren in gecorrumpeerde berichten. Om dit te voorkomen, gebruik SMTP voor het verzenden van berichten, zet de mail.add_x_header optie in uw php.ini file uit, gebruik MacOS of Linux, of pas de gebruikte PHP versie aan naar versie 7.0.17+ or 7.1.3+.';
|
||||
$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['extension_missing'] = 'Extensie afwezig: ';
|
||||
$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_header'] = 'Ongeldige header naam of waarde';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Ongeldige hostentry: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Ongeldige host: ';
|
||||
$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_code'] = 'SMTP code: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Aanvullende SMTP informatie: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detail: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: ';
|
||||
|
@@ -7,24 +7,32 @@
|
||||
* @author Lucas Guimarães <lucas@lucasguimaraes.com>
|
||||
* @author Phelipe Alves <phelipealvesdesouza@gmail.com>
|
||||
* @author Fabio Beneditto <fabiobeneditto@gmail.com>
|
||||
* @author Geidson Benício Coelho <geidsonc@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Sua versão do PHP é afetada por um bug que por resultar em messagens corrompidas. Para corrigir, mude para enviar usando SMTP, desative a opção mail.add_x_header em seu php.ini, mude para MacOS ou Linux, ou atualize seu PHP para versão 7.0.17+ ou 7.1.3+ ';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
|
||||
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Nome ou valor de cabeçalho inválido';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'hostentry inválido: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'host inválido: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Código do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informações adicionais do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalhes do servidor SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
|
||||
|
@@ -3,25 +3,31 @@
|
||||
/**
|
||||
* Romanian PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Alex Florea <alecz.fia@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Versiunea instalată de PHP este afectată de o problemă care poate duce la coruperea mesajelor Pentru a preveni această problemă, folosiți SMTP, dezactivați opțiunea mail.add_x_header din php.ini, folosiți MacOS/Linux sau actualizați versiunea de PHP la 7.0.17+ sau 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Numele sau valoarea header-ului nu este validă: ';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry invalid: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Host invalid: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
|
||||
$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'Cod SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Informații SMTP adiționale: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detalii SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
|
||||
|
@@ -9,23 +9,28 @@
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Na vašo PHP različico vpliva napaka, ki lahko povzroči poškodovana sporočila. Če želite težavo odpraviti, preklopite na pošiljanje prek SMTP, onemogočite možnost mail.add_x_header v vaši php.ini datoteki, preklopite na MacOS ali Linux, ali nadgradite vašo PHP zaličico na 7.0.17+ ali 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: ';
|
||||
$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_header'] = 'Neveljavno ime ali vrednost glave';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Neveljaven vnos gostitelja: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Neveljaven gostitelj: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Prosimo, vnesite vsaj enega naslovnika.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP koda: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatne informacije o SMTP: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Podrobnosti: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: ';
|
||||
|
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
|
||||
backupGlobals="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
verbose="true"
|
||||
colors="true"
|
||||
forceCoversAnnotation="false"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="PHPMailerTests">
|
||||
<directory>./test/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<listeners>
|
||||
<listener class="PHPMailer\Test\DebugLogTestListener" />
|
||||
</listeners>
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>languages</group>
|
||||
<group>pop3</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./src</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
|
||||
<log type="coverage-clover" target="build/logs/clover.xml"/>
|
||||
<log type="junit" target="build/logs/junit.xml"/>
|
||||
</logging>
|
||||
</phpunit>
|
@@ -35,6 +35,6 @@ class Exception extends \Exception
|
||||
*/
|
||||
public function errorMessage()
|
||||
{
|
||||
return '<strong>' . htmlspecialchars($this->getMessage()) . "</strong><br />\n";
|
||||
return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "</strong><br />\n";
|
||||
}
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ use League\OAuth2\Client\Token\AccessToken;
|
||||
*
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
*/
|
||||
class OAuth
|
||||
class OAuth implements OAuthTokenProvider
|
||||
{
|
||||
/**
|
||||
* An instance of the League OAuth Client Provider.
|
||||
|
44
data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php
vendored
Normal file
44
data/web/inc/lib/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHPMailer - PHP email creation and transport class.
|
||||
* PHP Version 5.5.
|
||||
*
|
||||
* @see 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 - 2020 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.
|
||||
*/
|
||||
|
||||
namespace PHPMailer\PHPMailer;
|
||||
|
||||
/**
|
||||
* OAuthTokenProvider - OAuth2 token provider interface.
|
||||
* Provides base64 encoded OAuth2 auth strings for SMTP authentication.
|
||||
*
|
||||
* @see OAuth
|
||||
* @see SMTP::authenticate()
|
||||
*
|
||||
* @author Peter Scopes (pdscopes)
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
*/
|
||||
interface OAuthTokenProvider
|
||||
{
|
||||
/**
|
||||
* Generate a base64-encoded OAuth token ensuring that the access token has not expired.
|
||||
* The string to be base 64 encoded should be in the form:
|
||||
* "user=<user_email_address>\001auth=Bearer <access_token>\001\001"
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOauth64();
|
||||
}
|
@@ -103,14 +103,14 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $From = 'root@localhost';
|
||||
public $From = '';
|
||||
|
||||
/**
|
||||
* The From name of the message.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $FromName = 'Root User';
|
||||
public $FromName = '';
|
||||
|
||||
/**
|
||||
* The envelope sender of the message.
|
||||
@@ -358,9 +358,9 @@ class PHPMailer
|
||||
public $AuthType = '';
|
||||
|
||||
/**
|
||||
* An instance of the PHPMailer OAuth class.
|
||||
* An implementation of the PHPMailer OAuthTokenProvider interface.
|
||||
*
|
||||
* @var OAuth
|
||||
* @var OAuthTokenProvider
|
||||
*/
|
||||
protected $oauth;
|
||||
|
||||
@@ -689,7 +689,7 @@ class PHPMailer
|
||||
protected $boundary = [];
|
||||
|
||||
/**
|
||||
* The array of available languages.
|
||||
* The array of available text strings for the current language.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
@@ -750,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.0';
|
||||
const VERSION = '6.6.0';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@@ -1185,28 +1185,37 @@ class PHPMailer
|
||||
*
|
||||
* @param string $addrstr The address list string
|
||||
* @param bool $useimap Whether to use the IMAP extension to parse the list
|
||||
* @param string $charset The charset to use when decoding the address list string.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function parseAddresses($addrstr, $useimap = true)
|
||||
public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591)
|
||||
{
|
||||
$addresses = [];
|
||||
if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
|
||||
//Use this built-in parser if it's available
|
||||
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
||||
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
|
||||
imap_errors();
|
||||
foreach ($list as $address) {
|
||||
if (
|
||||
('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
|
||||
$address->mailbox . '@' . $address->host
|
||||
)
|
||||
'.SYNTAX-ERROR.' !== $address->host &&
|
||||
static::validateAddress($address->mailbox . '@' . $address->host)
|
||||
) {
|
||||
//Decode the name part if it's present and encoded
|
||||
if (
|
||||
property_exists($address, 'personal') &&
|
||||
extension_loaded('mbstring') &&
|
||||
preg_match('/^=\?.*\?=$/', $address->personal)
|
||||
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
||||
defined('MB_CASE_UPPER') &&
|
||||
preg_match('/^=\?.*\?=$/s', $address->personal)
|
||||
) {
|
||||
$origCharset = mb_internal_encoding();
|
||||
mb_internal_encoding($charset);
|
||||
//Undo any RFC2047-encoded spaces-as-underscores
|
||||
$address->personal = str_replace('_', '=20', $address->personal);
|
||||
//Decode the name
|
||||
$address->personal = mb_decode_mimeheader($address->personal);
|
||||
mb_internal_encoding($origCharset);
|
||||
}
|
||||
|
||||
$addresses[] = [
|
||||
@@ -1234,9 +1243,16 @@ class PHPMailer
|
||||
$email = trim(str_replace('>', '', $email));
|
||||
$name = trim($name);
|
||||
if (static::validateAddress($email)) {
|
||||
//Check for a Mbstring constant rather than using extension_loaded, which is sometimes disabled
|
||||
//If this name is encoded, decode it
|
||||
if (preg_match('/^=\?.*\?=$/', $name)) {
|
||||
if (defined('MB_CASE_UPPER') && preg_match('/^=\?.*\?=$/s', $name)) {
|
||||
$origCharset = mb_internal_encoding();
|
||||
mb_internal_encoding($charset);
|
||||
//Undo any RFC2047-encoded spaces-as-underscores
|
||||
$name = str_replace('_', '=20', $name);
|
||||
//Decode the name
|
||||
$name = mb_decode_mimeheader($name);
|
||||
mb_internal_encoding($origCharset);
|
||||
}
|
||||
$addresses[] = [
|
||||
//Remove any surrounding quotes and spaces from the name
|
||||
@@ -1436,7 +1452,12 @@ class PHPMailer
|
||||
$errorcode = 0;
|
||||
if (defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
//Use the current punycode standard (appeared in PHP 7.2)
|
||||
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_UTS46);
|
||||
$punycode = idn_to_ascii(
|
||||
$domain,
|
||||
\IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI |
|
||||
\IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII,
|
||||
\INTL_IDNA_VARIANT_UTS46
|
||||
);
|
||||
} elseif (defined('INTL_IDNA_VARIANT_2003')) {
|
||||
//Fall back to this old, deprecated/removed encoding
|
||||
$punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003);
|
||||
@@ -1508,12 +1529,7 @@ class PHPMailer
|
||||
&& ini_get('mail.add_x_header') === '1'
|
||||
&& stripos(PHP_OS, 'WIN') === 0
|
||||
) {
|
||||
trigger_error(
|
||||
'Your version of PHP is affected by a bug that may result in corrupted messages.' .
|
||||
' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
|
||||
' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
|
||||
E_USER_WARNING
|
||||
);
|
||||
trigger_error($this->lang('buggy_php'), E_USER_WARNING);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -1687,7 +1703,10 @@ class PHPMailer
|
||||
//Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
|
||||
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||
//Example problem: https://www.drupal.org/node/1057954
|
||||
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||
|
||||
//PHP 5.6 workaround
|
||||
$sendmail_from_value = ini_get('sendmail_from');
|
||||
if (empty($this->Sender) && !empty($sendmail_from_value)) {
|
||||
//PHP config has a sender address we can use
|
||||
$this->Sender = ini_get('sendmail_from');
|
||||
}
|
||||
@@ -1724,7 +1743,7 @@ class PHPMailer
|
||||
fwrite($mail, $header);
|
||||
fwrite($mail, $body);
|
||||
$result = pclose($mail);
|
||||
$addrinfo = static::parseAddresses($toAddr);
|
||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
||||
$this->doCallback(
|
||||
($result === 0),
|
||||
[[$addrinfo['address'], $addrinfo['name']]],
|
||||
@@ -1779,7 +1798,13 @@ class PHPMailer
|
||||
*/
|
||||
protected static function isShellSafe($string)
|
||||
{
|
||||
//Future-proof
|
||||
//It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg,
|
||||
//but some hosting providers disable it, creating a security problem that we don't want to have to deal with,
|
||||
//so we don't.
|
||||
if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
escapeshellcmd($string) !== $string
|
||||
|| !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
|
||||
@@ -1869,7 +1894,10 @@ class PHPMailer
|
||||
//Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
|
||||
//Example problem: https://www.drupal.org/node/1057954
|
||||
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||
if (empty($this->Sender) && !empty(ini_get('sendmail_from'))) {
|
||||
|
||||
//PHP 5.6 workaround
|
||||
$sendmail_from_value = ini_get('sendmail_from');
|
||||
if (empty($this->Sender) && !empty($sendmail_from_value)) {
|
||||
//PHP config has a sender address we can use
|
||||
$this->Sender = ini_get('sendmail_from');
|
||||
}
|
||||
@@ -1884,7 +1912,7 @@ class PHPMailer
|
||||
if ($this->SingleTo && count($toArr) > 1) {
|
||||
foreach ($toArr as $toAddr) {
|
||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||
$addrinfo = static::parseAddresses($toAddr);
|
||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
||||
$this->doCallback(
|
||||
$result,
|
||||
[[$addrinfo['address'], $addrinfo['name']]],
|
||||
@@ -2133,7 +2161,8 @@ class PHPMailer
|
||||
}
|
||||
if ($tls) {
|
||||
if (!$this->smtp->startTLS()) {
|
||||
throw new Exception($this->lang('connect_host'));
|
||||
$message = $this->getSmtpErrorMessage('connect_host');
|
||||
throw new Exception($message);
|
||||
}
|
||||
//We must resend EHLO after TLS negotiation
|
||||
$this->smtp->hello($hello);
|
||||
@@ -2163,6 +2192,10 @@ class PHPMailer
|
||||
//As we've caught all exceptions, just report whatever the last one was
|
||||
if ($this->exceptions && null !== $lastexception) {
|
||||
throw $lastexception;
|
||||
} elseif ($this->exceptions) {
|
||||
// no exception was thrown, likely $this->smtp->connect() failed
|
||||
$message = $this->getSmtpErrorMessage('connect_host');
|
||||
throw new Exception($message);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -2181,14 +2214,15 @@ class PHPMailer
|
||||
|
||||
/**
|
||||
* Set the language for error messages.
|
||||
* Returns false if it cannot load the language file.
|
||||
* The default language is English.
|
||||
*
|
||||
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash).D
|
||||
* Optionally, the language code can be enhanced with a 4-character
|
||||
* script annotation and/or a 2-character country annotation.
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash)
|
||||
* Do not set this from user input!
|
||||
*
|
||||
* @return bool
|
||||
* @return bool Returns true if the requested language was loaded, false otherwise.
|
||||
*/
|
||||
public function setLanguage($langcode = 'en', $lang_path = '')
|
||||
{
|
||||
@@ -2211,44 +2245,77 @@ class PHPMailer
|
||||
//Define full set of translatable strings in English
|
||||
$PHPMAILER_LANG = [
|
||||
'authenticate' => 'SMTP Error: Could not authenticate.',
|
||||
'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' .
|
||||
' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
|
||||
' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
|
||||
'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
|
||||
'data_not_accepted' => 'SMTP Error: data not accepted.',
|
||||
'empty_message' => 'Message body empty',
|
||||
'encoding' => 'Unknown encoding: ',
|
||||
'execute' => 'Could not execute: ',
|
||||
'extension_missing' => 'Extension missing: ',
|
||||
'file_access' => 'Could not access file: ',
|
||||
'file_open' => 'File Error: Could not open file: ',
|
||||
'from_failed' => 'The following From address failed: ',
|
||||
'instantiate' => 'Could not instantiate mail function.',
|
||||
'invalid_address' => 'Invalid address: ',
|
||||
'invalid_header' => 'Invalid header name or value',
|
||||
'invalid_hostentry' => 'Invalid hostentry: ',
|
||||
'invalid_host' => 'Invalid host: ',
|
||||
'mailer_not_supported' => ' mailer is not supported.',
|
||||
'provide_address' => 'You must provide at least one recipient email address.',
|
||||
'recipients_failed' => 'SMTP Error: The following recipients failed: ',
|
||||
'signing' => 'Signing Error: ',
|
||||
'smtp_code' => 'SMTP code: ',
|
||||
'smtp_code_ex' => 'Additional SMTP info: ',
|
||||
'smtp_connect_failed' => 'SMTP connect() failed.',
|
||||
'smtp_detail' => 'Detail: ',
|
||||
'smtp_error' => 'SMTP server error: ',
|
||||
'variable_set' => 'Cannot set or reset variable: ',
|
||||
'extension_missing' => 'Extension missing: ',
|
||||
];
|
||||
if (empty($lang_path)) {
|
||||
//Calculate an absolute path so it can work if CWD is not here
|
||||
$lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
//Validate $langcode
|
||||
if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
|
||||
$foundlang = true;
|
||||
$langcode = strtolower($langcode);
|
||||
if (
|
||||
!preg_match('/^(?P<lang>[a-z]{2})(?P<script>_[a-z]{4})?(?P<country>_[a-z]{2})?$/', $langcode, $matches)
|
||||
&& $langcode !== 'en'
|
||||
) {
|
||||
$foundlang = false;
|
||||
$langcode = 'en';
|
||||
}
|
||||
$foundlang = true;
|
||||
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
|
||||
|
||||
//There is no English translation file
|
||||
if ('en' !== $langcode) {
|
||||
//Make sure language file path is readable
|
||||
if (!static::fileIsAccessible($lang_file)) {
|
||||
$langcodes = [];
|
||||
if (!empty($matches['script']) && !empty($matches['country'])) {
|
||||
$langcodes[] = $matches['lang'] . $matches['script'] . $matches['country'];
|
||||
}
|
||||
if (!empty($matches['country'])) {
|
||||
$langcodes[] = $matches['lang'] . $matches['country'];
|
||||
}
|
||||
if (!empty($matches['script'])) {
|
||||
$langcodes[] = $matches['lang'] . $matches['script'];
|
||||
}
|
||||
$langcodes[] = $matches['lang'];
|
||||
|
||||
//Try and find a readable language file for the requested language.
|
||||
$foundFile = false;
|
||||
foreach ($langcodes as $code) {
|
||||
$lang_file = $lang_path . 'phpmailer.lang-' . $code . '.php';
|
||||
if (static::fileIsAccessible($lang_file)) {
|
||||
$foundFile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($foundFile === false) {
|
||||
$foundlang = false;
|
||||
} else {
|
||||
//$foundlang = include $lang_file;
|
||||
$lines = file($lang_file);
|
||||
foreach ($lines as $line) {
|
||||
//Translation file lines look like this:
|
||||
@@ -2283,6 +2350,10 @@ class PHPMailer
|
||||
*/
|
||||
public function getTranslations()
|
||||
{
|
||||
if (empty($this->language)) {
|
||||
$this->setLanguage(); // Set the default language.
|
||||
}
|
||||
|
||||
return $this->language;
|
||||
}
|
||||
|
||||
@@ -2551,7 +2622,17 @@ class PHPMailer
|
||||
|
||||
//Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
|
||||
//https://tools.ietf.org/html/rfc5322#section-3.6.4
|
||||
if ('' !== $this->MessageID && preg_match('/^<.*@.*>$/', $this->MessageID)) {
|
||||
if (
|
||||
'' !== $this->MessageID &&
|
||||
preg_match(
|
||||
'/^<((([a-z\d!#$%&\'*+\/=?^_`{|}~-]+(\.[a-z\d!#$%&\'*+\/=?^_`{|}~-]+)*)' .
|
||||
'|("(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]|[\x21\x23-\x5B\x5D-\x7E])' .
|
||||
'|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*"))@(([a-z\d!#$%&\'*+\/=?^_`{|}~-]+' .
|
||||
'(\.[a-z\d!#$%&\'*+\/=?^_`{|}~-]+)*)|(\[(([\x01-\x08\x0B\x0C\x0E-\x1F\x7F]' .
|
||||
'|[\x21-\x5A\x5E-\x7E])|(\\[\x01-\x09\x0B\x0C\x0E-\x7F]))*\])))>$/Di',
|
||||
$this->MessageID
|
||||
)
|
||||
) {
|
||||
$this->lastMessageID = $this->MessageID;
|
||||
} else {
|
||||
$this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
|
||||
@@ -2561,16 +2642,15 @@ class PHPMailer
|
||||
$result .= $this->headerLine('X-Priority', $this->Priority);
|
||||
}
|
||||
if ('' === $this->XMailer) {
|
||||
//Empty string for default X-Mailer header
|
||||
$result .= $this->headerLine(
|
||||
'X-Mailer',
|
||||
'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)'
|
||||
);
|
||||
} else {
|
||||
$myXmailer = trim($this->XMailer);
|
||||
if ($myXmailer) {
|
||||
$result .= $this->headerLine('X-Mailer', $myXmailer);
|
||||
}
|
||||
}
|
||||
} elseif (is_string($this->XMailer) && trim($this->XMailer) !== '') {
|
||||
//Some string
|
||||
$result .= $this->headerLine('X-Mailer', trim($this->XMailer));
|
||||
} //Other values result in no X-Mailer header
|
||||
|
||||
if ('' !== $this->ConfirmReadingTo) {
|
||||
$result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');
|
||||
@@ -3935,13 +4015,13 @@ class PHPMailer
|
||||
if (!empty($lasterror['error'])) {
|
||||
$msg .= $this->lang('smtp_error') . $lasterror['error'];
|
||||
if (!empty($lasterror['detail'])) {
|
||||
$msg .= ' Detail: ' . $lasterror['detail'];
|
||||
$msg .= ' ' . $this->lang('smtp_detail') . $lasterror['detail'];
|
||||
}
|
||||
if (!empty($lasterror['smtp_code'])) {
|
||||
$msg .= ' SMTP code: ' . $lasterror['smtp_code'];
|
||||
$msg .= ' ' . $this->lang('smtp_code') . $lasterror['smtp_code'];
|
||||
}
|
||||
if (!empty($lasterror['smtp_code_ex'])) {
|
||||
$msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
|
||||
$msg .= ' ' . $this->lang('smtp_code_ex') . $lasterror['smtp_code_ex'];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4002,7 +4082,7 @@ class PHPMailer
|
||||
empty($host)
|
||||
|| !is_string($host)
|
||||
|| strlen($host) > 256
|
||||
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+])$/', $host)
|
||||
|| !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -4052,6 +4132,26 @@ class PHPMailer
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an error message starting with a generic one and adding details if possible.
|
||||
*
|
||||
* @param string $base_key
|
||||
* @return string
|
||||
*/
|
||||
private function getSmtpErrorMessage($base_key)
|
||||
{
|
||||
$message = $this->lang($base_key);
|
||||
$error = $this->smtp->getError();
|
||||
if (!empty($error['error'])) {
|
||||
$message .= ' ' . $error['error'];
|
||||
if (!empty($error['detail'])) {
|
||||
$message .= ' ' . $error['detail'];
|
||||
}
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an error occurred.
|
||||
*
|
||||
@@ -4079,11 +4179,11 @@ class PHPMailer
|
||||
list($name, $value) = explode(':', $name, 2);
|
||||
}
|
||||
$name = trim($name);
|
||||
$value = trim($value);
|
||||
$value = (null === $value) ? '' : trim($value);
|
||||
//Ensure name is not empty, and that neither name nor value contain line breaks
|
||||
if (empty($name) || strpbrk($name . $value, "\r\n") !== false) {
|
||||
if ($this->exceptions) {
|
||||
throw new Exception('Invalid header name or value');
|
||||
throw new Exception($this->lang('invalid_header'));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -4237,7 +4337,8 @@ class PHPMailer
|
||||
*
|
||||
* @param string $html The HTML text to convert
|
||||
* @param bool|callable $advanced Any boolean value to use the internal converter,
|
||||
* or provide your own callable for custom conversion
|
||||
* or provide your own callable for custom conversion.
|
||||
* *Never* pass user-supplied data into this parameter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -4951,9 +5052,9 @@ class PHPMailer
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the OAuth instance.
|
||||
* Get the OAuthTokenProvider instance.
|
||||
*
|
||||
* @return OAuth
|
||||
* @return OAuthTokenProvider
|
||||
*/
|
||||
public function getOAuth()
|
||||
{
|
||||
@@ -4961,9 +5062,9 @@ class PHPMailer
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an OAuth instance.
|
||||
* Set an OAuthTokenProvider instance.
|
||||
*/
|
||||
public function setOAuth(OAuth $oauth)
|
||||
public function setOAuth(OAuthTokenProvider $oauth)
|
||||
{
|
||||
$this->oauth = $oauth;
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.0';
|
||||
const VERSION = '6.6.0';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
@@ -308,6 +308,7 @@ class POP3
|
||||
{
|
||||
if (!$this->connected) {
|
||||
$this->setError('Not connected to POP3 server');
|
||||
return false;
|
||||
}
|
||||
if (empty($username)) {
|
||||
$username = $this->username;
|
||||
@@ -337,6 +338,15 @@ class POP3
|
||||
public function disconnect()
|
||||
{
|
||||
$this->sendString('QUIT');
|
||||
|
||||
// RFC 1939 shows POP3 server sending a +OK response to the QUIT command.
|
||||
// Try to get it. Ignore any failures here.
|
||||
try {
|
||||
$this->getResponse();
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
//The QUIT command may cause the daemon to exit, which will kill our connection
|
||||
//So ignore errors here
|
||||
try {
|
||||
@@ -344,6 +354,10 @@ class POP3
|
||||
} catch (Exception $e) {
|
||||
//Do nothing
|
||||
}
|
||||
|
||||
// Clean up attributes.
|
||||
$this->connected = false;
|
||||
$this->pop_conn = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.5.0';
|
||||
const VERSION = '6.6.0';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@@ -187,6 +187,7 @@ class SMTP
|
||||
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
|
||||
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
|
||||
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
||||
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -392,7 +393,6 @@ class SMTP
|
||||
STREAM_CLIENT_CONNECT,
|
||||
$socket_context
|
||||
);
|
||||
restore_error_handler();
|
||||
} else {
|
||||
//Fall back to fsockopen which should work in more places, but is missing some features
|
||||
$this->edebug(
|
||||
@@ -407,8 +407,8 @@ class SMTP
|
||||
$errstr,
|
||||
$timeout
|
||||
);
|
||||
restore_error_handler();
|
||||
}
|
||||
restore_error_handler();
|
||||
|
||||
//Verify we connected properly
|
||||
if (!is_resource($connection)) {
|
||||
@@ -483,7 +483,7 @@ class SMTP
|
||||
* @param string $username The user name
|
||||
* @param string $password The password
|
||||
* @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
|
||||
* @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication
|
||||
* @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication
|
||||
*
|
||||
* @return bool True if successfully authenticated
|
||||
*/
|
||||
@@ -696,7 +696,7 @@ class SMTP
|
||||
/**
|
||||
* 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
|
||||
* finalizing 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 an additional <CRLF>.
|
||||
@@ -1170,7 +1170,7 @@ class SMTP
|
||||
if (!$this->server_caps) {
|
||||
$this->setError('No HELO/EHLO was sent');
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!array_key_exists($name, $this->server_caps)) {
|
||||
@@ -1182,7 +1182,7 @@ class SMTP
|
||||
}
|
||||
$this->setError('HELO handshake was used; No information about server extensions available');
|
||||
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->server_caps[$name];
|
||||
|
Reference in New Issue
Block a user