29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-27 07:33:41 +00:00

Updating dependencies - JFW/Registry & PHPMailer

This commit is contained in:
Michael Babker 2014-05-19 14:59:18 -05:00
parent 301a401283
commit e073601ba4
63 changed files with 2259 additions and 1956 deletions

24
composer.lock generated
View File

@ -3,7 +3,7 @@
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "6e8a5d60a98a70cf477246100dc41fe5",
"hash": "e9e4b9f27430e53db204e173d6d125f2",
"packages": [
{
"name": "ircmaxell/password-compat",
@ -122,16 +122,16 @@
},
{
"name": "joomla/registry",
"version": "1.1.2",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/registry.git",
"reference": "d4526f2fb6295fbd3c688fa817e72a1821d7c0e4"
"reference": "2be70676835f7457719df0418be89397bfd55900"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/d4526f2fb6295fbd3c688fa817e72a1821d7c0e4",
"reference": "d4526f2fb6295fbd3c688fa817e72a1821d7c0e4",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/2be70676835f7457719df0418be89397bfd55900",
"reference": "2be70676835f7457719df0418be89397bfd55900",
"shasum": ""
},
"require": {
@ -164,7 +164,7 @@
"joomla",
"registry"
],
"time": "2014-02-09 07:19:55"
"time": "2014-05-19 19:41:20"
},
{
"name": "joomla/string",
@ -246,16 +246,16 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v5.2.7",
"version": "v5.2.8",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "8717a79565b2c0ed67f851d70e1949febdf3b226"
"reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/8717a79565b2c0ed67f851d70e1949febdf3b226",
"reference": "8717a79565b2c0ed67f851d70e1949febdf3b226",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f",
"reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f",
"shasum": ""
},
"require": {
@ -263,7 +263,7 @@
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "*"
"phpunit/phpunit": "4.0.*"
},
"type": "library",
"autoload": {
@ -295,7 +295,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"time": "2013-09-12 07:52:38"
"time": "2014-05-14 07:04:18"
},
{
"name": "symfony/yaml",

View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673::getLoader();
return ComposerAutoloaderInitc5d48e2f5d54e79f350f58206fc66f28::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673
class ComposerAutoloaderInitc5d48e2f5d54e79f350f58206fc66f28
{
private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitc5d48e2f5d54e79f350f58206fc66f28', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitc5d48e2f5d54e79f350f58206fc66f28', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
@ -45,14 +45,14 @@ class ComposerAutoloaderInit7052f00c2486a4dcadcf1934a7ee3673
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequire7052f00c2486a4dcadcf1934a7ee3673($file);
composerRequirec5d48e2f5d54e79f350f58206fc66f28($file);
}
return $loader;
}
}
function composerRequire7052f00c2486a4dcadcf1934a7ee3673($file)
function composerRequirec5d48e2f5d54e79f350f58206fc66f28($file)
{
require $file;
}

View File

@ -161,54 +161,6 @@
"joomla"
]
},
{
"name": "joomla/registry",
"version": "1.1.2",
"version_normalized": "1.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/registry.git",
"reference": "d4526f2fb6295fbd3c688fa817e72a1821d7c0e4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/d4526f2fb6295fbd3c688fa817e72a1821d7c0e4",
"reference": "d4526f2fb6295fbd3c688fa817e72a1821d7c0e4",
"shasum": ""
},
"require": {
"joomla/compat": "~1.0",
"joomla/utilities": "~1.0",
"php": ">=5.3.10"
},
"require-dev": {
"joomla/test": "~1.0",
"symfony/yaml": "~2.0"
},
"suggest": {
"symfony/yaml": "Install 2.* if you require YAML support."
},
"time": "2014-02-09 07:19:55",
"type": "joomla-package",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Joomla\\Registry\\": "src/",
"Joomla\\Registry\\Tests\\": "Tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"description": "Joomla Registry Package",
"homepage": "https://github.com/joomla-framework/registry",
"keywords": [
"framework",
"joomla",
"registry"
]
},
{
"name": "ircmaxell/password-compat",
"version": "1.0.3",
@ -250,61 +202,6 @@
"password"
]
},
{
"name": "phpmailer/phpmailer",
"version": "v5.2.7",
"version_normalized": "5.2.7.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "8717a79565b2c0ed67f851d70e1949febdf3b226"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/8717a79565b2c0ed67f851d70e1949febdf3b226",
"reference": "8717a79565b2c0ed67f851d70e1949febdf3b226",
"shasum": ""
},
"require": {
"php": ">=5.0.0"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "*"
},
"time": "2013-09-12 07:52:38",
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.pop3.php",
"class.smtp.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
},
{
"name": "symfony/yaml",
"version": "v2.4.4",
@ -355,5 +252,108 @@
],
"description": "Symfony Yaml Component",
"homepage": "http://symfony.com"
},
{
"name": "joomla/registry",
"version": "1.1.3",
"version_normalized": "1.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/registry.git",
"reference": "2be70676835f7457719df0418be89397bfd55900"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/registry/zipball/2be70676835f7457719df0418be89397bfd55900",
"reference": "2be70676835f7457719df0418be89397bfd55900",
"shasum": ""
},
"require": {
"joomla/compat": "~1.0",
"joomla/utilities": "~1.0",
"php": ">=5.3.10"
},
"require-dev": {
"joomla/test": "~1.0",
"symfony/yaml": "~2.0"
},
"suggest": {
"symfony/yaml": "Install 2.* if you require YAML support."
},
"time": "2014-05-19 19:41:20",
"type": "joomla-package",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Joomla\\Registry\\": "src/",
"Joomla\\Registry\\Tests\\": "Tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
],
"description": "Joomla Registry Package",
"homepage": "https://github.com/joomla-framework/registry",
"keywords": [
"framework",
"joomla",
"registry"
]
},
{
"name": "phpmailer/phpmailer",
"version": "v5.2.8",
"version_normalized": "5.2.8.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f",
"reference": "d3802c597bff8f6c2ccfa3eab2a511aa01b8d68f",
"shasum": ""
},
"require": {
"php": ">=5.0.0"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "4.0.*"
},
"time": "2014-05-14 07:04:18",
"type": "library",
"installation-source": "dist",
"autoload": {
"classmap": [
"class.phpmailer.php",
"class.pop3.php",
"class.smtp.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-2.1"
],
"authors": [
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
},
{
"name": "Brent R. Matzelle"
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP"
}
]

View File

@ -1,4 +1,4 @@
# The Registry Package
# The Registry Package [![Build Status](https://travis-ci.org/joomla-framework/registry.png?branch=master)](https://travis-ci.org/joomla-framework/registry)
``` php
use Joomla\Registry\Registry;
@ -27,7 +27,7 @@ $registry->loadString('<root></root>', 'xml');
// Load by object or array
$registry->loadObject($object);
$registry->loadaArray($array);
$registry->loadArray($array);
// Load by file
$registry->loadFile($root . '/config/config.json', 'json');
@ -260,20 +260,18 @@ $registry->loadString('<data><value name="foo" type="string">bar</value></data>,
## Installation via Composer
Add `"joomla/registry": "dev-master"` to the require block in your composer.json, make sure you have `"minimum-stability": "dev"` and then run `composer install`.
Add `"joomla/registry": "~1.0"` to the require block in your composer.json and then run `composer install`.
```json
{
"require": {
"joomla/registry": "dev-master"
},
"minimum-stability": "dev"
"joomla/registry": "~1.0"
}
}
```
Alternatively, you can simply run the following from the command line:
```sh
composer init --stability="dev"
composer require joomla/registry "dev-master"
composer require joomla/registry "~1.0"
```

View File

@ -159,12 +159,16 @@ class RegistryTest extends \PHPUnit_Framework_TestCase
'Line: ' . __LINE__ . ' The input value should exist in the parent object.'
);
TestHelper::invoke($a, 'bindData', $parent, array('foo' => 'bar'));
TestHelper::invoke($a, 'bindData', $parent, array('foo' => 'bar', 'nullstring' => null));
$this->assertThat(
$parent->{'foo'},
$this->equalTo('bar'),
'Line: ' . __LINE__ . ' The input value should exist in the parent object.'
);
$this->assertNull(
$parent->{'nullstring'},
'Line: ' . __LINE__ . ' A null string should still be set in the constructor.'
);
TestHelper::invoke($a, 'bindData', $parent, array('level1' => array('level2' => 'value2')));
$this->assertThat(

View File

@ -309,7 +309,7 @@ class Registry implements \JsonSerializable, \ArrayAccess
*/
public function merge(Registry $source, $recursive = false)
{
$this->bindData($this->data, $source->toArray(), $recursive);
$this->bindData($this->data, $source->toArray(), $recursive, false);
return $this;
}
@ -468,7 +468,7 @@ class Registry implements \JsonSerializable, \ArrayAccess
*
* @since 1.0
*/
protected function bindData($parent, $data, $recursive = true)
protected function bindData($parent, $data, $recursive = true, $allowNull = true)
{
// Ensure the input data is an array.
if (is_object($data))
@ -482,12 +482,12 @@ class Registry implements \JsonSerializable, \ArrayAccess
foreach ($data as $k => $v)
{
if ($v === '' || $v === null)
if (!$allowNull && !(($v !== null) && ($v !== '')))
{
continue;
}
if ((is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v) && $recursive)
if ($recursive && ((is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v)))
{
if (!isset($parent->$k))
{

View File

@ -2,3 +2,4 @@ docs/phpdoc/
test/message.txt
test/testbootstrap.php
.idea
build/

View File

@ -0,0 +1,126 @@
before_commands:
- "composer install --prefer-source"
tools:
# Code Coverage
external_code_coverage:
enabled: true
timeout: 300
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
php_code_coverage:
enabled: false
test_command: phpunit
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Code Sniffer
php_code_sniffer:
enabled: true
command: phpcs
config:
standard: PSR2
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Copy/Paste Detector
php_cpd:
enabled: true
command: phpcpd
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# PHP CS Fixer (http://http://cs.sensiolabs.org/).
php_cs_fixer:
enabled: true
command: php-cs-fixer
config:
level: psr2
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Analyzes the size and structure of a PHP project.
php_loc:
enabled: true
command: phploc
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# PHP Mess Detector (http://phpmd.org).
php_mess_detector:
enabled: true
command: phpmd
config:
rulesets:
- codesize
- unusedcode
- naming
- design
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Analyzes the size and structure of a PHP project.
php_pdepend:
enabled: true
command: pdepend
excluded_dirs:
- docs
- examples
- extras
- test
- vendor
# Runs Scrutinizer's PHP Analyzer Tool
php_analyzer:
enabled: true
filter:
excluded_paths:
- 'docs/*'
- 'examples/*'
- 'extras/*'
- 'test/*'
- 'vendor/*'
# Security Advisory Checker
sensiolabs_security_checker: true

View File

@ -9,6 +9,7 @@ before_install:
before_script:
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
- mkdir -p build/logs
- cd test
- cp testbootstrap-dist.php testbootstrap.php
- chmod +x fakesendmail.sh
@ -16,5 +17,10 @@ before_script:
- sudo cp fakesendmail.sh /var/qmail/bin/sendmail
- sudo cp fakesendmail.sh /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i|grep "PHP Version"|head -n 1|grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
- pwd
- ls -al
script:
- phpunit phpmailerTest
- phpunit --configuration ../travis.phpunit.xml.dist
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml

View File

@ -1,14 +1,14 @@
<?php
/**
* PHPMailer SPL autoloader.
* PHP Version 5.0.0
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2013 Marcus Bointon
* @copyright 2012 - 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -30,4 +30,20 @@ function PHPMailerAutoload($classname)
}
}
spl_autoload_register('PHPMailerAutoload');
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
//SPL autoloading was introduced in PHP 5.1.2
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
spl_autoload_register('PHPMailerAutoload', true, true);
} else {
spl_autoload_register('PHPMailerAutoload');
}
} else {
/**
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
function __autoload($classname)
{
PHPMailerAutoload($classname);
}
}

View File

@ -1,17 +1,22 @@
![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png)
# PHPMailer - A full-featured email creation and transfer class for PHP
Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](https://travis-ci.org/Synchro/PHPMailer)
Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
## Class Features
- Probably the world's most popular code for sending email from PHP!
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
- Integrated SMTP support - send without a local mail server
- send emails with multiple TOs, CCs, BCCs and REPLY-TOs
- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
- Multipart/alternative emails for mail clients that do not read HTML email
- Support for 8bit, base64, binary, and quoted-printable encoding
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms over SSL and TLS transports
- Native language support
- DKIM and S/MIME signing support
- Compatible with PHP 5.0 and later
- Much more!
@ -29,29 +34,35 @@ The PHP mail() function usually sends via a local mail server, typically fronted
This software is licenced under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html). Please read LICENSE for information on the
software availability and distribution.
## Installation
## Installation & loading
PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer). Alternatively, just copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub.
PHPMailer provides an SPL-compatible autoloader, and that is the preferred way of loading the library - just `require '/path/to/PHPMailerAutoload.php';` and everything should work. The autoloader does not throw errors if it can't find classes so it prepends itself to the SPL list, allowing your own (or your framework's) autoloader to catch errors. SPL autoloading was introduced in PHP 5.1.0, so if you are using a version older than that you will need to require/include each class manually.
PHPMailer does *not* declare a namespace because namespaces were only introduced in PHP 5.3.
### Minimal installation
While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you will need [class.phpmailer.php](class.phpmailer.php). If you're using SMTP, you'll need [class.smtp.php](class.smtp.php), and if you're using POP-before SMTP, you'll need [class.pop3.php](class.pop3.php). For all of these, we recommend you use [the autoloader](PHPMailerAutoload.php) too. You can skip the [language](language/) folder if you're not showing errors to users and can make do with English-only errors. You may need the additional classes in the [extras](extras/) folder if you are using those features, including NTLM authentication, advanced HTML-to-text conversion and ics generation.
## A Simple Example
```php
<?php
require 'class.phpmailer.php';
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'jswan'; // SMTP username
$mail->Username = 'user@example.com'; // SMTP username
$mail->Password = 'secret'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
$mail->From = 'from@example.com';
$mail->FromName = 'Mailer';
$mail->addAddress('josh@example.net', 'Josh Adams'); // Add a recipient
$mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient
$mail->addAddress('ellen@example.com'); // Name is optional
$mail->addReplyTo('info@example.com', 'Information');
$mail->addCC('cc@example.com');
@ -67,35 +78,38 @@ $mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
echo 'Message has been sent';
```
You'll find plenty more to play with in the `examples` folder.
You'll find plenty more to play with in the [examples](examples/) folder.
That's it. You should now be ready to use PHPMailer!
## Localization
PHPMailer defaults to English, but in the `languages` folder you'll find numerous translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
PHPMailer defaults to English, but in the [language](language/) folder you'll find numerous (39 at the time of writing) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
```php
// To load the French version
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
```
We welcome corrections and new languages - if you're looking for corrections to do, run the [phpmailerLangTest.php](test/phpmailerLangTest.php) script in the tests folder and it will show any missing translations.
## Documentation
You'll find some basic user-level docs in the docs folder, and you can generate complete API-level documentation using the `generatedocs.sh` shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first.
Generated documentation is [available online](http://phpmailer.github.io/PHPMailer/).
You'll find some basic user-level docs in the [docs](docs/) folder, and you can generate complete API-level documentation using the [generatedocs.sh](docs/generatedocs.sh) shell script in the docs folder, though you'll need to install [PHPDocumentor](http://www.phpdoc.org) first. You may find [the unit tests](test/phpmailerTest.php) a good source of how to do various operations such as encryption.
## Tests
You'll find a PHPUnit test script in the `test` folder.
There is a PHPUnit test script in the [test](test/) folder.
Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.png)](https://travis-ci.org/PHPMailer/PHPMailer)
Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer)
If this isn't passing, is there something you can do to help?
@ -128,7 +142,7 @@ See [changelog](changelog.md).
- Test suite.
- Continuous integration with Travis-CI.
- Composer support.
- Rolling releases.
- Public development.
- Additional languages and language strings.
- CRAM-MD5 authentication support.
- Preserves full repo history of authors, commits and branches from the original SourceForge project.

View File

@ -1,5 +1,46 @@
# ChangeLog
## Version 5.2.8 (May 14th 2014)
* Increase timeout to match RFC2821 section 4.5.3.2 and thus not fail greetdelays, fixes #104
* Add timestamps to default debug output
* Add connection events and new level 3 to debug output options
* Chinese language update (Thanks to @binaryoung)
* Allow custom Mailer types (Thanks to @michield)
* Cope with spaces around SMTP host specs
* Fix processing of multiple hosts in connect string
* Added Galician translation (Thanks to @donatorouco)
* Autoloader now prepends
* Docs updates
* Add Latvian translation (Thanks to @eddsstudio)
* Add Belarusian translation (Thanks to @amaksymiuk)
* Make autoloader work better on older PHP versions
* Avoid double-encoding if mbstring is overloading mail()
* Add Portuguese translation (Thanks to @Jonadabe)
* Make quoted-printable encoder respect line ending setting
* Improve Chinese translation (Thanks to @PeterDaveHello)
* Add Georgian translation (Thanks to @akalongman)
* Add Greek translation (Thanks to @lenasterg)
* Fix serverHostname on PHP < 5.3
* Improve performance of SMTP class
* Implement automatic 7bit downgrade
* Add Vietnamese translation (Thanks to @vinades)
* Improve example images, switch to PNG
* Add Croatian translation (Thanks to @hrvoj3e)
* Remove setting the Return-Path and deprecate the Return-path property - it's just wrong!
* Fix language file loading if CWD has changed (@stephandesouza)
* Add HTML5 email validation pattern
* Improve Turkish translations (Thanks to @yasinaydin)
* Improve Romanian translations (Thanks to @aflorea)
* Fix quoted-printable encoding of multiparts
* Check php.ini for path to sendmail/qmail before using default
* Improve Farsi translation (Thanks to @MHM5000)
* Don't use quoted-printable encoding for multipart types
* Add Serbian translation (Thanks to ajevremovic at gmail.com)
* Remove useless PHP5 check
* Use SVG for build status badges
* Store MessageDate on creation
* Better default behaviour for validateAddress
## Version 5.2.7 (September 12th 2013)
* Add Ukranian translation from @Krezalis
* Support for do_verp
@ -122,7 +163,7 @@
#52, #31, #41, #5. #70, #69
## Version 5.2.1 (January 16, 2012)
* Closed several bugs#5
* Closed several bugs #5
* Performance improvements
* MsgHTML() now returns the message as required.
* New method: GetSentMIMEMessage() (returns full copy of sent message)
@ -251,11 +292,11 @@ NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS. IF YOU
to, an error was thrown for the date() functions used (line 1565 and 1569).
This is NOT a PHPMailer error, it is the result of an incorrectly configured
PHP5 installation. The fix is to modify your 'php.ini' file and include the
date.timezone = America/New York
date.timezone = Etc/UTC (or your own zone)
directive, to your own server timezone
- If you do get this error, and are unable to access your php.ini file:
In your PHP script, add
`date_default_timezone_set('America/Toronto');`
`date_default_timezone_set('Etc/UTC');`
- do not try to use
`$myVar = date_default_timezone_get();`
as a test, it will throw an error.
@ -295,31 +336,6 @@ Please note, this is BETA software
* included example showing how to use PHPMailer with GMAIL
* fixed the missing Cc in SendMail() and Mail()
******************
A note on sending bulk emails:
If the email you are sending is not personalized, consider using the
"undisclosed-recipient:;" strategy. That is, put all of your recipients
in the Bcc field and set the To field to "undisclosed-recipients:;".
It's a lot faster (only one send) and saves quite a bit on resources.
Contrary to some opinions, this will not get you listed in spam engines -
it's a legitimate way for you to send emails.
A partial example for use with PHPMailer:
```
$mail->AddAddress("undisclosed-recipients:;");
$mail->AddBCC("email1@anydomain.com,email2@anyotherdomain.com,email3@anyalternatedomain.com");
```
Many email service providers restrict the number of emails that can be sent
in any given time period. Often that is between 50 - 60 emails maximum
per hour or per send session.
If that's the case, then break up your Bcc lists into chunks that are one
less than your limit, and put a pause in your script.
*******************
## Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
* dramatically simplified using inline graphics ... it's fully automated and requires no user input
* added automatic document type detection for attachments and pictures
@ -332,26 +348,8 @@ less than your limit, and put a pause in your script.
* added Estonian language file by Indrek P&auml;ri
* added header injection patch
* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc.
example of use:
```
$mail->set('X-Priority', '3');
$mail->set('X-MSMail-Priority', 'Normal');
```
* fixed warning message in SMTP get_lines method
* added TLS/SSL SMTP support. Example of use:
```
$mail = new PHPMailer();
$mail->Mailer = "smtp";
$mail->Host = "smtp.example.com";
$mail->SMTPSecure = "tls"; // option
//$mail->SMTPSecure = "ssl"; // option
...
$mail->Send();
```
* added TLS/SSL SMTP support.
* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7)
* Works with PHP installed as a module or as CGI-PHP
NOTE: will NOT work with PHP5 in E_STRICT error mode

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,14 @@
<?php
/**
* PHPMailer POP-Before-SMTP Authentication Class.
* PHP Version 5.0.0
* Version 5.2.7
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @copyright 2013 Marcus Bointon
* @copyright 2012 - 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
@ -24,11 +23,10 @@
* Does not support APOP.
* @package PHPMailer
* @author Richard Davey (original author) <rich@corephp.co.uk>
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
*/
class POP3
{
/**
@ -36,7 +34,7 @@ class POP3
* @type string
* @access public
*/
public $Version = '5.2.7';
public $Version = '5.2.8';
/**
* Default POP3 port number.
@ -337,11 +335,11 @@ class POP3
*/
private function getResponse($size = 128)
{
$r = fgets($this->pop_conn, $size);
$response = fgets($this->pop_conn, $size);
if ($this->do_debug >= 1) {
echo "Server -> Client: $r";
echo "Server -> Client: $response";
}
return $r;
return $response;
}
/**

View File

@ -1,102 +1,117 @@
<?php
/**
* PHPMailer RFC821 SMTP email transport class.
* Version 5.2.7
* PHP version 5.0.0
* @category PHP
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/
* @author Marcus Bointon (coolbru) <phpmailer@synchromedia.co.uk>
* PHP Version 5
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @copyright 2013 Marcus Bointon
* @copyright 2004 - 2008 Andy Prevost
* @author Brent R. Matzelle (original founder)
* @copyright 2014 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* PHPMailer RFC821 SMTP email transport class.
*
* Implements RFC 821 SMTP commands
* and provides some utility methods for sending mail to an SMTP server.
*
* PHP Version 5.0.0
*
* @category PHP
* @package PHPMailer
* @link https://github.com/PHPMailer/PHPMailer/blob/master/class.smtp.php
* @author Chris Ryan <unknown@example.com>
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
* Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
* @package PHPMailer
* @author Chris Ryan <unknown@example.com>
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
*/
class SMTP
{
/**
* The PHPMailer SMTP Version number.
* The PHPMailer SMTP version number.
* @type string
*/
const VERSION = '5.2.7';
const VERSION = '5.2.8';
/**
* SMTP line break constant.
* @type string
*/
const CRLF = "\r\n";
/**
* The SMTP port to use if one is not specified.
* @type int
*/
const DEFAULT_SMTP_PORT = 25;
/**
* The maximum line length allowed by RFC 2822 section 2.1.1
* @type int
*/
const MAX_LINE_LENGTH = 998;
/**
* The PHPMailer SMTP Version number.
* @type string
* @deprecated This should be a constant
* @deprecated Use the constant instead
* @see SMTP::VERSION
*/
public $Version = '5.2.7';
public $Version = '5.2.8';
/**
* SMTP server port number.
* @type int
* @deprecated This is only ever ued as default value, so should be a constant
* @deprecated This is only ever used as a default value, so use the constant instead
* @see SMTP::DEFAULT_SMTP_PORT
*/
public $SMTP_PORT = 25;
/**
* SMTP reply line ending
* SMTP reply line ending.
* @type string
* @deprecated Use the class constant instead
* @deprecated Use the constant instead
* @see SMTP::CRLF
*/
public $CRLF = "\r\n";
/**
* Debug output level.
* Options: 0 for no output, 1 for commands, 2 for data and commands
* Options:
* * `0` No output
* * `1` Commands
* * `2` Data and commands
* * `3` As 2 plus connection status
* * `4` Low-level data output
* @type int
*/
public $do_debug = 0;
/**
* The function/method to use for debugging output.
* Options: 'echo', 'html' or 'error_log'
* How to handle debug output.
* Options:
* * `echo` Output plain-text as-is, appropriate for CLI
* * `html` Output escaped, line breaks converted to <br>, appropriate for browser output
* * `error_log` Output to error log as configured in php.ini
* @type string
*/
public $Debugoutput = 'echo';
/**
* Whether to use VERP.
* @link http://en.wikipedia.org/wiki/Variable_envelope_return_path
* @link http://www.postfix.org/VERP_README.html Info on VERP
* @type bool
*/
public $do_verp = false;
/**
* The SMTP timeout value for reads, in seconds.
* The timeout value for connection, in seconds.
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
* This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.
* @link http://tools.ietf.org/html/rfc2821#section-4.5.3.2
* @type int
*/
public $Timeout = 15;
public $Timeout = 300;
/**
* The SMTP timelimit value for reads, in seconds.
@ -137,7 +152,6 @@ class SMTP
$this->smtp_conn = 0;
$this->error = null;
$this->helo_rply = null;
$this->do_debug = 0;
}
@ -164,15 +178,14 @@ class SMTP
break;
case 'echo':
default:
//Just echoes whatever was received
echo $str;
echo gmdate('Y-m-d H:i:s')."\t".trim($str)."\n";
}
}
/**
* Connect to an SMTP server.
* @param string $host SMTP server IP or host name
* @param int $port The port number to connect to
* @param string $host SMTP server IP or host name
* @param int $port The port number to connect to
* @param int $timeout How long to wait for the connection to open
* @param array $options An array of options for stream_context_create()
* @access public
@ -182,19 +195,19 @@ class SMTP
{
// Clear errors to avoid confusion
$this->error = null;
// Make sure we are __not__ connected
if ($this->connected()) {
// Already connected, generate error
$this->error = array('error' => 'Already connected to a server');
return false;
}
if (empty($port)) {
$port = self::DEFAULT_SMTP_PORT;
}
// Connect to the SMTP server
if ($this->do_debug >= 3) {
$this->edebug('Connection: opening');
}
$errno = 0;
$errstr = '';
$socket_context = stream_context_create($options);
@ -207,7 +220,6 @@ class SMTP
STREAM_CLIENT_CONNECT,
$socket_context
);
// Verify we connected properly
if (empty($this->smtp_conn)) {
$this->error = array(
@ -217,13 +229,15 @@ class SMTP
);
if ($this->do_debug >= 1) {
$this->edebug(
'SMTP -> ERROR: ' . $this->error['error']
'SMTP ERROR: ' . $this->error['error']
. ": $errstr ($errno)"
);
}
return false;
}
if ($this->do_debug >= 3) {
$this->edebug('Connection: opened');
}
// SMTP server can take longer to respond, give longer timeout for first read
// Windows does not have support for this timeout function
if (substr(PHP_OS, 0, 3) != 'WIN') {
@ -233,14 +247,11 @@ class SMTP
}
stream_set_timeout($this->smtp_conn, $timeout, 0);
}
// Get any announcement
$announce = $this->get_lines();
if ($this->do_debug >= 2) {
$this->edebug('SMTP -> FROM SERVER:' . $announce);
$this->edebug('SERVER -> CLIENT: ' . $announce);
}
return true;
}
@ -251,7 +262,7 @@ class SMTP
*/
public function startTLS()
{
if (!$this->sendCommand("STARTTLS", "STARTTLS", 220)) {
if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) {
return false;
}
// Begin encrypted connection
@ -259,8 +270,7 @@ class SMTP
$this->smtp_conn,
true,
STREAM_CRYPTO_METHOD_TLS_CLIENT
)
) {
)) {
return false;
}
return true;
@ -288,7 +298,6 @@ class SMTP
if (empty($authtype)) {
$authtype = 'LOGIN';
}
switch ($authtype) {
case 'PLAIN':
// Start authentication
@ -351,7 +360,6 @@ class SMTP
) {
return false;
}
//Though 0 based, there is a white space after the 3 digit number
//msg2
$challenge = substr($this->last_reply, 3);
@ -411,13 +419,13 @@ class SMTP
// Eliminates the need to install mhash to compute a HMAC
// Hacked by Lance Rushing
$b = 64; // byte length for md5
if (strlen($key) > $b) {
$bytelen = 64; // byte length for md5
if (strlen($key) > $bytelen) {
$key = pack('H*', md5($key));
}
$key = str_pad($key, $b, chr(0x00));
$ipad = str_pad('', $b, chr(0x36));
$opad = str_pad('', $b, chr(0x5c));
$key = str_pad($key, $bytelen, chr(0x00));
$ipad = str_pad('', $bytelen, chr(0x36));
$opad = str_pad('', $bytelen, chr(0x5c));
$k_ipad = $key ^ $ipad;
$k_opad = $key ^ $opad;
@ -437,7 +445,7 @@ class SMTP
// the socket is valid but we are not connected
if ($this->do_debug >= 1) {
$this->edebug(
'SMTP -> NOTICE: EOF caught while checking if connected'
'SMTP NOTICE: EOF caught while checking if connected'
);
}
$this->close();
@ -462,6 +470,9 @@ class SMTP
if (!empty($this->smtp_conn)) {
// close the connection and cleanup
fclose($this->smtp_conn);
if ($this->do_debug >= 3) {
$this->edebug('Connection: closed');
}
$this->smtp_conn = 0;
}
}
@ -483,62 +494,52 @@ class SMTP
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return false;
}
/* The server is ready to accept data!
* according to rfc821 we should not send more than 1000
* including the CRLF
* characters on a single line so we will break the data up
* into lines by \r and/or \n then if needed we will break
* each of those into smaller lines to fit within the limit.
* in addition we will be looking for lines that start with
* a period '.' and append and additional period '.' to that
* line. NOTE: this does not count towards limit.
* According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF)
* so we will break the data up into lines by \r and/or \n then if needed we will break each of those into
* smaller lines to fit within the limit.
* We will also look for lines that start with a '.' and prepend an additional '.'.
* NOTE: this does not count towards line-length limit.
*/
// Normalize the line breaks before exploding
$msg_data = str_replace("\r\n", "\n", $msg_data);
$msg_data = str_replace("\r", "\n", $msg_data);
$lines = explode("\n", $msg_data);
// Normalize line breaks before exploding
$lines = explode("\n", str_replace(array("\r\n", "\r"), "\n", $msg_data));
/* We need to find a good way to determine if headers are
* in the msg_data or if it is a straight msg body
* currently I am assuming rfc822 definitions of msg headers
* and if the first field of the first line (':' separated)
* does not contain a space then it _should_ be a header
* and we can process all lines before a blank "" line as
* headers.
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
* of the first line (':' separated) does not contain a space then it _should_ be a header and we will
* process all lines before a blank line as headers.
*/
$field = substr($lines[0], 0, strpos($lines[0], ':'));
$in_headers = false;
if (!empty($field) && !strstr($field, ' ')) {
if (!empty($field) && strpos($field, ' ') === false) {
$in_headers = true;
}
//RFC 2822 section 2.1.1 limit
$max_line_length = 998;
foreach ($lines as $line) {
$lines_out = null;
if ($line == '' && $in_headers) {
$lines_out = array();
if ($in_headers and $line == '') {
$in_headers = false;
}
// ok we need to break this line up into several smaller lines
while (strlen($line) > $max_line_length) {
$pos = strrpos(substr($line, 0, $max_line_length), ' ');
// Patch to fix DOS attack
if (!$pos) {
$pos = $max_line_length - 1;
//This is a small micro-optimisation: isset($str[$len]) is equivalent to (strlen($str) > $len)
while (isset($line[self::MAX_LINE_LENGTH])) {
//Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on
//so as to avoid breaking in the middle of a word
$pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' ');
if (!$pos) { //Deliberately matches both false and 0
//No nice break found, add a hard break
$pos = self::MAX_LINE_LENGTH - 1;
$lines_out[] = substr($line, 0, $pos);
$line = substr($line, $pos);
} else {
//Break at the found point
$lines_out[] = substr($line, 0, $pos);
//Move along by the amount we dealt with
$line = substr($line, $pos + 1);
}
/* If processing headers add a LWSP-char to the front of new line
* rfc822 on long msg headers
* RFC822 section 3.1.1
*/
if ($in_headers) {
$line = "\t" . $line;
@ -546,12 +547,11 @@ class SMTP
}
$lines_out[] = $line;
// send the lines to the server
while (list(, $line_out) = @each($lines_out)) {
if (strlen($line_out) > 0) {
if (substr($line_out, 0, 1) == '.') {
$line_out = '.' . $line_out;
}
// Send the lines to the server
foreach ($lines_out as $line_out) {
//RFC2821 section 4.5.2
if (!empty($line_out) and $line_out[0] == '.') {
$line_out = '.' . $line_out;
}
$this->client_send($line_out . self::CRLF);
}
@ -565,7 +565,7 @@ class SMTP
* Send an SMTP HELO or EHLO command.
* Used to identify the sending server to the receiving server.
* This makes sure that client and server are in a known state.
* Implements from RFC 821: HELO <SP> <domain> <CRLF>
* Implements RFC 821: HELO <SP> <domain> <CRLF>
* and RFC 2821 EHLO.
* @param string $host The host name or IP to connect to
* @access public
@ -574,13 +574,7 @@ class SMTP
public function hello($host = '')
{
// Try extended hello first (RFC 2821)
if (!$this->sendHello('EHLO', $host)) {
if (!$this->sendHello('HELO', $host)) {
return false;
}
}
return true;
return (bool)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));
}
/**
@ -588,7 +582,7 @@ class SMTP
* Low-level implementation used by hello()
* @see hello()
* @param string $hello The HELO string
* @param string $host The hostname to say we are
* @param string $host The hostname to say we are
* @access protected
* @return bool
*/
@ -631,28 +625,28 @@ class SMTP
public function quit($close_on_error = true)
{
$noerror = $this->sendCommand('QUIT', 'QUIT', 221);
$e = $this->error; //Save any error
$err = $this->error; //Save any error
if ($noerror or $close_on_error) {
$this->close();
$this->error = $e; //Restore any error from the quit command
$this->error = $err; //Restore any error from the quit command
}
return $noerror;
}
/**
* Send an SMTP RCPT command.
* Sets the TO argument to $to.
* Sets the TO argument to $toaddr.
* Returns true if the recipient was accepted false if it was rejected.
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
* @param string $to The address the message is being sent to
* @param string $toaddr The address the message is being sent to
* @access public
* @return bool
*/
public function recipient($to)
public function recipient($toaddr)
{
return $this->sendCommand(
'RCPT TO ',
'RCPT TO:<' . $to . '>',
'RCPT TO',
'RCPT TO:<' . $toaddr . '>',
array(250, 251)
);
}
@ -681,7 +675,7 @@ class SMTP
{
if (!$this->connected()) {
$this->error = array(
"error" => "Called $command without being connected"
'error' => "Called $command without being connected"
);
return false;
}
@ -691,19 +685,19 @@ class SMTP
$code = substr($reply, 0, 3);
if ($this->do_debug >= 2) {
$this->edebug('SMTP -> FROM SERVER:' . $reply);
$this->edebug('SERVER -> CLIENT: ' . $reply);
}
if (!in_array($code, (array)$expect)) {
$this->last_reply = null;
$this->error = array(
"error" => "$command command failed",
"smtp_code" => $code,
"detail" => substr($reply, 4)
'error' => "$command command failed",
'smtp_code' => $code,
'detail' => substr($reply, 4)
);
if ($this->do_debug >= 1) {
$this->edebug(
'SMTP -> ERROR: ' . $this->error['error'] . ': ' . $reply
'SMTP ERROR: ' . $this->error['error'] . ': ' . $reply
);
}
return false;
@ -729,7 +723,7 @@ class SMTP
*/
public function sendAndMail($from)
{
return $this->sendCommand("SAML", "SAML FROM:$from", 250);
return $this->sendCommand('SAML', "SAML FROM:$from", 250);
}
/**
@ -740,7 +734,7 @@ class SMTP
*/
public function verify($name)
{
return $this->sendCommand("VRFY", "VRFY $name", array(250, 251));
return $this->sendCommand('VRFY', "VRFY $name", array(250, 251));
}
/**
@ -751,14 +745,14 @@ class SMTP
*/
public function noop()
{
return $this->sendCommand("NOOP", "NOOP", 250);
return $this->sendCommand('NOOP', 'NOOP', 250);
}
/**
* Send an SMTP TURN command.
* This is an optional command for SMTP that this class does not support.
* This method is here to make the RFC821 Definition
* complete for this class and __may__ be implemented in future
* This method is here to make the RFC821 Definition complete for this class
* and _may_ be implemented in future
* Implements from rfc 821: TURN <CRLF>
* @access public
* @return bool
@ -769,7 +763,7 @@ class SMTP
'error' => 'The SMTP TURN command is not implemented'
);
if ($this->do_debug >= 1) {
$this->edebug('SMTP -> NOTICE: ' . $this->error['error']);
$this->edebug('SMTP NOTICE: ' . $this->error['error']);
}
return false;
}
@ -778,12 +772,12 @@ class SMTP
* Send raw data to the server.
* @param string $data The data to send
* @access public
* @return int|bool The number of bytes sent to the server or FALSE on error
* @return int|bool The number of bytes sent to the server or false on error
*/
public function client_send($data)
{
if ($this->do_debug >= 1) {
$this->edebug("CLIENT -> SMTP: $data");
$this->edebug("CLIENT -> SERVER: $data");
}
return fwrite($this->smtp_conn, $data);
}
@ -819,12 +813,12 @@ class SMTP
*/
protected function get_lines()
{
// If the connection is bad, give up straight away
if (!is_resource($this->smtp_conn)) {
return '';
}
$data = '';
$endtime = 0;
// If the connection is bad, give up now
if (!is_resource($this->smtp_conn)) {
return $data;
}
stream_set_timeout($this->smtp_conn, $this->Timeout);
if ($this->Timelimit > 0) {
$endtime = time() + $this->Timelimit;
@ -839,8 +833,8 @@ class SMTP
if ($this->do_debug >= 4) {
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"");
}
// if 4th character is a space, we are done reading, break the loop
if (substr($str, 3, 1) == ' ') {
// If 4th character is a space, we are done reading, break the loop, micro-optimisation over strlen
if ((isset($str[3]) and $str[3] == ' ')) {
break;
}
// Timed-out? Log and break
@ -854,16 +848,14 @@ class SMTP
break;
}
// Now check if reads took too long
if ($endtime) {
if (time() > $endtime) {
if ($this->do_debug >= 4) {
$this->edebug(
'SMTP -> get_lines(): timelimit reached ('
. $this->Timelimit . ' sec)'
);
}
break;
if ($endtime and time() > $endtime) {
if ($this->do_debug >= 4) {
$this->edebug(
'SMTP -> get_lines(): timelimit reached ('.
$this->Timelimit . ' sec)'
);
}
break;
}
}
return $data;

View File

@ -3,14 +3,14 @@
"type": "library",
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"authors": [
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Marcus Bointon",
"email": "phpmailer@synchromedia.co.uk"
},
{
"name": "Jim Jagielski",
"email": "jimjag@gmail.com"
},
{
"name": "Andy Prevost",
"email": "codeworxtech@users.sourceforge.net"
@ -24,7 +24,7 @@
},
"require-dev": {
"phpdocumentor/phpdocumentor": "*",
"phpunit/phpunit": "*"
"phpunit/phpunit": "4.0.*"
},
"autoload": {
"classmap": ["class.phpmailer.php", "class.pop3.php", "class.smtp.php"]

View File

@ -3,143 +3,127 @@
<title>Examples using phpmailer</title>
</head>
<body bgcolor="#FFFFFF">
<body>
<h2>Examples using phpmailer</h2>
<h2>Examples using PHPMailer</h2>
<h3>1. Advanced Example</h3>
<p>
This demonstrates sending out multiple email messages with binary attachments
from a MySQL database with multipart/alternative support.<p>
<table cellpadding="4" border="1" width="80%">
<tr>
<td bgcolor="#CCCCCC">
This demonstrates sending multiple email messages with binary attachments
from a MySQL database using multipart/alternative messages.<p>
<pre>
require("class.phpmailer.php");
require 'PHPMailerAutoload.php';
$mail = new phpmailer();
$mail = new PHPMailer();
$mail->From = "list@example.com";
$mail->FromName = "List manager";
$mail->Host = "smtp1.example.com;smtp2.example.com";
$mail->Mailer = "smtp";
$mail->From = 'list@example.com';
$mail->FromName = 'List manager';
$mail->Host = 'smtp1.example.com;smtp2.example.com';
$mail->Mailer = 'smtp';
@MYSQL_CONNECT("localhost","root","password");
@mysql_select_db("my_company");
$query<EFBFBD> =<3D>"SELECT full_name, email,<2C>photo<74>FROM employee<65>WHERE<52>id=$id";
$result<EFBFBD>=<3D>@MYSQL_QUERY($query);
@mysqli_connect('localhost','root','password');
@mysqli_select_db("my_company");
$query = "SELECT full_name, email, photo FROM employee";
$result = @mysqli_query($query);
while ($row = mysql_fetch_array ($result))
while ($row = mysqli_fetch_assoc($result))
{
// HTML body
$body = "Hello &lt;font size=\"4\"&gt;" . $row["full_name"] . "&lt;/font&gt;, &lt;p&gt;";
$body = "Hello &lt;font size=\"4\"&gt;" . $row['full_name'] . "&lt;/font&gt;, &lt;p&gt;";
$body .= "&lt;i&gt;Your&lt;/i&gt; personal photograph to this message.&lt;p&gt;";
$body .= "Sincerely, &lt;br&gt;";
$body .= "phpmailer List manager";
// Plain text body (for mail clients that cannot read HTML)
$text_body = "Hello " . $row["full_name"] . ", \n\n";
$text_body = 'Hello ' . $row['full_name'] . ", \n\n";
$text_body .= "Your personal photograph to this message.\n\n";
$text_body .= "Sincerely, \n";
$text_body .= "phpmailer List manager";
$text_body .= 'phpmailer List manager';
$mail->Body = $body;
$mail->AltBody = $text_body;
$mail->addAddress($row["email"], $row["full_name"]);
$mail->addStringAttachment($row["photo"], "YourPhoto.jpg");
$mail->addAddress($row['email'], $row['full_name']);
$mail->addStringAttachment($row['photo'], 'YourPhoto.jpg');
if(!$mail->send())
echo "There has been a mail error sending to " . $row["email"] . "&lt;br&gt;";
echo "There has been a mail error sending to " . $row['email'] . "&lt;br&gt;";
// Clear all addresses and attachments for next loop
$mail->clearAddresses();
$mail->clearAttachments();
}
</pre>
</td>
</tr>
</table>
<p>
<h3>2. Extending phpmailer</h3>
<h3>2. Extending PHPMailer</h3>
<p>
Extending classes with inheritance is one of the most
powerful features of object-oriented
programming. It allows you to make changes to the
original class for your
own personal use without hacking the original
classes. Plus, it is very
easy to do. I've provided an example:
powerful features of object-oriented programming. It allows you to make changes to the
original class for your own personal use without hacking the original
classes, and it's very easy to do:
<p>
Here's a class that extends the phpmailer class and sets the defaults
for the particular site:<br>
PHP include file: <b>mail.inc.php</b>
PHP include file: my_phpmailer.php
<p>
<table cellpadding="4" border="1" width="80%">
<tr>
<td bgcolor="#CCCCCC">
<pre>
require("class.phpmailer.php");
require 'PHPMailerAutoload.php';
class my_phpmailer extends phpmailer {
class my_phpmailer extends PHPMailer {
// Set default variables for all new objects
var $From = "from@example.com";
var $FromName = "Mailer";
var $Host = "smtp1.example.com;smtp2.example.com";
var $Mailer = "smtp"; // Alternative to isSMTP()
var $WordWrap = 75;
public $From = 'from@example.com';
public $FromName = 'Mailer';
public $Host = 'smtp1.example.com;smtp2.example.com';
public $Mailer = 'smtp'; // Alternative to isSMTP()
public $WordWrap = 75;
// Replace the default error_handler
function error_handler($msg) {
print("My Site Error");
print("Description:");
printf("%s", $msg);
// Replace the default debug output function
protected function edebug($msg) {
print('My Site Error');
print('Description:');
printf('%s', $msg);
exit;
}
//Extend the send function
public function send() {
$this->Subject = '[Yay for me!] '.$this->Subject;
return parent::send()
}
// Create an additional function
function do_something($something) {
public function do_something($something) {
// Place your new code here
}
}
</pre>
</td>
</tr>
</table>
<br>
Now here's a normal PHP page in the site, which will have all the defaults set above:<br>
Normal PHP file: <b>mail_test.php</b>
<table cellpadding="4" border="1" width="80%">
<tr>
<td bgcolor="#CCCCCC">
<pre>
require("mail.inc.php");
require 'my_phpmailer.php';
// Instantiate your new class
$mail = new my_phpmailer;
// Now you only need to add the necessary stuff
$mail->addAddress("josh@example.com", "Josh Adams");
$mail->Subject = "Here is the subject";
$mail->Body = "This is the message body";
$mail->addAttachment("c:/temp/11-10-00.zip", "new_name.zip"); // optional name
$mail->addAddress('josh@example.com', 'Josh Adams');
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the message body';
$mail->addAttachment('c:/temp/11-10-00.zip', 'new_name.zip'); // optional name
if(!$mail->send())
{
echo "There was an error sending the message";
echo 'There was an error sending the message';
exit;
}
echo "Message was sent successfully";
echo 'Message was sent successfully';
</pre>
</td>
</tr>
</table>
</body>
</html>

View File

@ -1,67 +1,28 @@
<html>
<head>
<title>PHPMailer FAQ</title>
<style>
body, p {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
div.width {
width: 500px;
text-align: left;
}
</style>
</head>
<body bgcolor="#FFFFFF">
<center>
<div class="width">
<body>
<h2>PHPMailer FAQ</h2>
<ul>
<li><b style="background-color: #FFFF00">Q:</b> <b>I&#039;m using the SMTP mailer and I keep on getting a timeout message
well before the X seconds I set it for. What gives?</b><br />
<b style="background-color: #FFFF00">A:</b> PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout
early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix:
<a href="timeoutfix.diff">timeoutfix.diff</a>. Otherwise you can wait for the new PHP release.<br /><br /></li>
<li><b style="background-color: #FFFF00">Q:</b> <b>I am concerned that using include files will take up too much
processing time on my computer. How can I make it run faster?</b><br />
<b style="background-color: #FFFF00">A:</b> PHP by itself is very fast. Much faster than ASP or JSP running on
the same type of server. This is because it has very little overhead compared
to its competitors and it pre-compiles all of
its code before it runs each script (in PHP4). However, all of
this compiling and re-compiling can take up a lot of valuable
computer resources. However, there are programs out there that compile
PHP code and store it in memory (or on mmaped files) to reduce the
processing immensely. Two of these: <a href="http://apc.communityconnect.com">APC
(Alternative PHP Cache)</a> and <a href="http://bwcache.bware.it/index.htm">Afterburner</a>
(<a href="http://www.mm4.de/php4win/mod_php4_win32/">Win32 download</a>)
are excellent free tools that do just this. If you have the money
you might also try <a href="http://www.zend.com">Zend Cache</a>, it is
even faster than the open source varieties. All of these tools make your
scripts run faster while also reducing the load on your server. I have tried
them myself and they are quite stable too.<br /><br /></li>
<li><b style="background-color: #FFFF00">Q:</b> <b>What mailer gives me the best performance?</b><br />
<b style="background-color: #FFFF00">A:</b> On a single machine the <b>sendmail (or Qmail)</b> is fastest overall.
Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP.
If you have you have your mail server on a another machine then
SMTP is your only option, but you do get the benefit of redundant mail servers.<br />
If you are running a mailing list with thousands of names, the fastest mailers in order are: SMTP, sendmail (or Qmail), mail().<br /><br /></li>
<li><b style="background-color: #FFFF00">Q:</b> <b>When I try to attach a file with on my server I get a
"Could not find {file} on filesystem error". Why is this?</b><br />
<b style="background-color: #FFFF00">A:</b> If you are using a Unix machine this is probably because the user
running your web server does not have read access to the directory in question. If you are using Windows,
then the problem probably is that you have used single backslashes to denote directories (\).
A single backslash has a special meaning to PHP so these are not
valid. Instead use double backslashes ("\\") or a single forward
slash ("/").<br /><br /></li>
<li><strong>Q: I am concerned that using include files will take up too much
processing time on my computer. How can I make it run faster?</strong><br>
<strong>A:</strong> PHP by itself is fairly fast, but it recompiles scripts every time they are run, which takes up valuable
computer resources. You can bypass this by using an opcode cache which compiles
PHP code and store it in memory to reduce overhead immensely. <a href="http://www.php.net/apc/">APC
(Alternative PHP Cache)</a> is a free opcode cache extension in the PECL library.</li>
<li><strong>Q: Which mailer gives me the best performance?</strong><br>
<strong>A:</strong> On a single machine the <strong>sendmail (or Qmail)</strong> is fastest overall.
Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP.
If you do not have a local mail server (as is typical on Windows), SMTP is your only option.</li>
<li><strong>Q: When I try to attach a file with on my server I get a
"Could not find {file} on filesystem error". Why is this?</strong><br>
<strong>A:</strong> If you are using a Unix machine this is probably because the user
running your web server does not have read access to the directory in question. If you are using Windows,
then the problem is probably that you have used single backslashes to denote directories (\).
A single backslash has a special meaning to PHP so these are not
valid. Instead use double backslashes ("\\") or a single forward
slash ("/").</li>
</ul>
</div>
</center>
</body>
</html>

4
libraries/vendor/phpmailer/phpmailer/docs/generatedocs.sh vendored Normal file → Executable file
View File

@ -1,5 +1,5 @@
#!/bin/sh
# Regenerate PHPMailer documentation
# Run from within the docs folder
rm -rf phpdocs/*
phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer
rm -rf phpdoc/*
phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer --template="clean"

View File

@ -177,10 +177,10 @@ try {
$example_code .= "\n\$mail->WordWrap = 80;";
$example_code .= "\n\$mail->msgHTML(\$body, dirname(__FILE__), true); //Create message bodies and embed images";
$mail->addAttachment('images/phpmailer_mini.gif', 'phpmailer_mini.gif'); // optional name
$mail->addAttachment('images/phpmailer_mini.png', 'phpmailer_mini.png'); // optional name
$mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name
$example_code .= "\n\$mail->addAttachment('images/phpmailer_mini.gif'," .
"'phpmailer_mini.gif'); // optional name";
$example_code .= "\n\$mail->addAttachment('images/phpmailer_mini.png'," .
"'phpmailer_mini.png'); // optional name";
$example_code .= "\n\$mail->addAttachment('images/phpmailer.png', 'phpmailer.png'); // optional name";
try {

View File

@ -26,7 +26,7 @@ try {
//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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message
//Note that we don't need check the response from this because it will throw an exception if it has trouble
$mail->send();

View File

@ -15,42 +15,58 @@ require '../PHPMailerAutoload.php';
//Create a new PHPMailer instance
$mail = new PHPMailer();
//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 = 2;
//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;
//Username to use for SMTP authentication - use full email address for gmail
$mail->Username = "username@gmail.com";
//Password to use for SMTP authentication
$mail->Password = "yourpassword";
//Set who the message is to be sent from
$mail->setFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
$mail->addReplyTo('replyto@example.com', 'First Last');
//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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="UTF-8">
<title>PHPMailer Examples</title>
</head>
<body>

View File

@ -24,7 +24,7 @@ $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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {

View File

@ -14,7 +14,6 @@ $mail->isSMTP();
$mail->Host = 'smtp.example.com';
$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead
$mail->Host = 'mail.example.com';
$mail->Port = 25;
$mail->Username = 'yourname@example.com';
$mail->Password = 'yourpassword';
@ -23,15 +22,20 @@ $mail->addReplyTo('list@example.com', 'List manager');
$mail->Subject = "PHPMailer Simple database mailing list test";
//connect to the database and select the recipients from your mailing list that have not yet been sent to
//Same body for all messages, so set this before the sending loop
//If you generate a different body for each recipient (e.g. you're using a templating system),
//set it inside the loop
$mail->msgHTML($body);
//msgHTML also sets AltBody, so if you want a custom one, set it afterwards
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
//Connect to the database and select the recipients from your mailing list that have not yet been sent to
//You'll need to alter this to match your database
$mysql = mysql_connect('localhost', 'username', 'password');
mysql_select_db('mydb', $mysql);
$result = mysql_query("SELECT full_name, email, photo FROM mailinglist WHERE sent = false", $mysql);
while ($row = mysql_fetch_array($result)) {
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
$mail->msgHTML($body);
$mail->addAddress($row['email'], $row['full_name']);
$mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB

View File

@ -45,7 +45,7 @@ try {
//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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message
//Note that we don't need check the response from this because it will throw an exception if it has trouble
$mail->send();

0
libraries/vendor/phpmailer/phpmailer/examples/scripts/XRegExp.js vendored Normal file → Executable file
View File

View File

@ -26,7 +26,7 @@ $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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {

View File

@ -48,7 +48,7 @@ $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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {

View File

@ -44,7 +44,7 @@ $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.gif');
$mail->addAttachment('images/phpmailer_mini.png');
//send the message, check for errors
if (!$mail->send()) {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Belarusian Version by Aleksander Maksymiuk <info@setpro.pl>
*/
$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.';
$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.';
$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.';
$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.';
$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: ';
$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: ';
$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: ';
$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: ';
$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: ';
$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().';
$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';
$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.';
$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';
$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: ';
$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';

View File

@ -1,7 +1,7 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Portuguese Version
* Brazilian Portuguese Version
* By Paulo Henrique Garcia - paulo@controllerweb.com.br
* Edited by Lucas Guimarães - lucas@lucasguimaraes.com
*/

View File

@ -5,21 +5,21 @@
* By Ivan: web AT microstudi DOT com
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s\'hapogut autenticar.';
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No sha pogut autenticar.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.';
$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l\'arxiu: ';
$PHPMAILER_LANG['file_open'] = 'Error d\'Arxiu: No es pot obrir l\'arxiu: ';
$PHPMAILER_LANG['file_access'] = 'No es pot accedir a larxiu: ';
$PHPMAILER_LANG['file_open'] = 'Error dArxiu: No es pot obrir larxiu: ';
$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'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['instantiate'] = 'No sha pogut crear una instància de la funció Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Adreça demail 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['provide_address'] = 'Sha de proveir almenys una adreça demail com a destinatari.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
//$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['signing'] = 'Error al signar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No sha pogut establir o restablir la variable: ';

View File

@ -0,0 +1,24 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Greek Version
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Σφάλμα: Αδυναμία πιστοποίησης (authentication).';
$PHPMAILER_LANG['connect_host'] = 'SMTP Σφάλμα: Αδυναμία σύνδεσης στον SMTP-Host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Σφάλμα: Τα δεδομένα δεν έγιναν αποδεκτά.';
$PHPMAILER_LANG['empty_message'] = 'Το E-Mail δεν έχει περιεχόμενο .';
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
$PHPMAILER_LANG['file_open'] = 'Σφάλμα Αρχείου: Δεν είναί δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν αποστέλθηκε, η διεύθυνση δεν είναι έγκυρη.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτων διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
$PHPMAILER_LANG['signing'] = 'Σφάλμα υπογραφής: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Αποτυχία σύνδεσης στον SMTP Server.';
$PHPMAILER_LANG['smtp_error'] = 'Σφάλμα από τον SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';

View File

@ -3,23 +3,24 @@
* PHPMailer language file: refer to English translation for definitive list
* Persian/Farsi Version, UTF-8
* By: Ali Jazayeri <jaza.ali@gmail.com>
* Edit: Mohammad Hossein Mojtahedi <mhm5000@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Error: احراز هویت با شکست مواجه شد.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Error: اتصال به سرور SMTP برقرار نشد.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: داده ها نادرست هستند.';
$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.';
$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.';
$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.';
$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.';
$PHPMAILER_LANG['encoding'] = 'رمزگذاری ناشناخته: ';
$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: ';
$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: ';
$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: ';
$PHPMAILER_LANG['file_open'] = 'File Error: امکان بازکردن فایل وجود ندارد: ';
$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: ';
$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: ';
$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.';
$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی شود.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمیشود.';
$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: ارسال به آدرس گیرنده با خطا مواجه شد: ';
$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: ';
$PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';

View File

@ -12,12 +12,12 @@
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP: échec de l\'authentification.';
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP: impossible de se connecter au serveur SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP: données incorrectes.';
$PHPMAILER_LANG['empty_message'] = 'Corps de message vide.';
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';
$PHPMAILER_LANG['encoding'] = 'Encodage inconnu: ';
$PHPMAILER_LANG['execute'] = 'Impossible de lancer l\'exécution: ';
$PHPMAILER_LANG['file_access'] = 'Impossible d\'accéder au fichier: ';
$PHPMAILER_LANG['file_open'] = 'Erreur de fichier: ouverture impossible: ';
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échouée: ';
$PHPMAILER_LANG['file_open'] = 'Ouverture du fichier impossible: ';
$PHPMAILER_LANG['from_failed'] = 'L\'adresse d\'expéditeur suivante a échoué: ';
$PHPMAILER_LANG['instantiate'] = 'Impossible d\'instancier la fonction mail.';
$PHPMAILER_LANG['invalid_address'] = 'L\'adresse courriel n\'est pas valide: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' client de messagerie non supporté.';
@ -26,4 +26,4 @@ $PHPMAILER_LANG['recipients_failed'] = 'Erreur SMTP: les destinataires sui
$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'] = 'Ne peut initialiser ou réinitialiser une variable: ';
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable: ';

View File

@ -0,0 +1,26 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Galician version
* Versión en galego
* Edited by Donato Rouco - donatorouco@gmail.com
*/
$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.';
$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.';
$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía';
$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: ';
$PHPMAILER_LANG['execute'] = 'Non puido ser executado: ';
$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: ';
$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: ';
$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: ';
$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.';
$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Erro ó firmar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: ';

View File

@ -0,0 +1,25 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Croatian Version
* By Hrvoj3e <hrvoj3e@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: ';
$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: ';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: ';
$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.';
$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.';
$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: ';
$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: ';

View File

@ -0,0 +1,24 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Georgian Version by Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';
$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';
$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: ';
$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';
$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: ';
$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';
$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: ';
$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.';
$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';
$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';
$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია';
$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';
$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';

View File

@ -0,0 +1,24 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Latvian version by Eduards M. <e@npd.lv>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.';
$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs';
$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: ';
$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: ';
$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: ';
$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: ';
$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: ';
$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.';
$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese';
$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.';
$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: ';
$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda';
$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: ';
$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: ';

View File

@ -4,21 +4,21 @@
* Dutch Version by Tuxion <team@tuxion.nl>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';//SMTP Error: Could not authenticate.
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';//SMTP Error: Could not connect to SMTP host.
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';//SMTP Error: Data not accepted.
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';//Message body empty
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';//Unknown encoding:
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';//Could not execute:
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';//Could not access file:
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';//File Error: Could not open file:
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';//The following From address failed:
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';//Could not instantiate mail function.
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';//Invalid address
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';// mailer is not supported.
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';//You must provide at least one recipient email address.
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';//SMTP Error: The following recipients failed:
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';//Signing Error:
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';//SMTP server error:
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';//Cannot set or reset variable:
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';

View File

@ -21,4 +21,4 @@ $PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottagere feilet
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';

View File

@ -4,7 +4,7 @@
* Polish Version
*/
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić autentykacji.';
$PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.';
$PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.';
$PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.';
$PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.';
@ -14,11 +14,12 @@ $PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: ';
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, '.
'następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
$PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można zmienić zmiennej: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';

View File

@ -0,0 +1,26 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* pt-PT
* Portuguese (European) Version 1.0
* By Jonadabe - jonadabe@hotmail.com
*/
$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.';
$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: ';
$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';

View File

@ -9,18 +9,18 @@
$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Nu a functionat autentificarea.';
$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
$PHPMAILER_LANG['encoding'] = 'Encodare necunoscuta: ';
$PHPMAILER_LANG['execute'] = 'Nu pot executa: ';
$PHPMAILER_LANG['file_access'] = 'Nu pot accesa fisierul: ';
$PHPMAILER_LANG['file_open'] = 'Eroare de fisier: Nu pot deschide fisierul: ';
$PHPMAILER_LANG['from_failed'] = 'Urmatoarele adrese From au dat eroare: ';
$PHPMAILER_LANG['instantiate'] = 'Nu am putut instantia functia mail.';
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este valida. ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
$PHPMAILER_LANG['provide_address'] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
//$PHPMAILER_LANG['signing'] = '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['signing'] = 'A aparut o problema la semnarea emailului. ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a esuat.';
$PHPMAILER_LANG['smtp_error'] = 'A aparut o eroare la serverul SMTP. ';
$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';

View File

@ -0,0 +1,25 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Serbian Version
* Александар Јевремовић <ajevremovic@gmail.com>
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.';
$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: није могуће повезивање са SMTP сервером.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.';
$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.';
$PHPMAILER_LANG['encoding'] = 'Непознато кодовање: ';
$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: ';
$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: ';
$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: ';
$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: ';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: ';
$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.';
$PHPMAILER_LANG['invalid_address'] = 'Порука није послата због неисправне адресе.';
$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.';
$PHPMAILER_LANG['provide_address'] = 'Потребно је задати најмање једну адресу.';
$PHPMAILER_LANG['signing'] = 'Грешка приликом пријављивања: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.';
$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Није могуће задати променљиву, нити је вратити уназад: ';

View File

@ -3,24 +3,25 @@
* PHPMailer language file: refer to English translation for definitive list
* Turkish version
* Türkçe Versiyonu
* ÝZYAZILIM - Elçin Özel - Can Yýlmaz - Mehmet Benlioðlu
* Elçin Özel - Can Yılmaz - Mehmet Benlioğlu
* Updated by: github.com/yasinaydin
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Doğrulanamıyor.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP hosta bağlanılamıyor.';
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.';
$PHPMAILER_LANG['empty_message'] = 'Mesaj içeriği boş';
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen şifreleme: ';
$PHPMAILER_LANG['execute'] = 'Çalıtırılamıyor: ';
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemiyor: ';
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamıyor: ';
$PHPMAILER_LANG['from_failed'] = 'Başarısız olan gönderici adresi: ';
$PHPMAILER_LANG['instantiate'] = 'Örnek mail fonksiyonu oluşturulamadı.';
$PHPMAILER_LANG['invalid_address'] = 'Gönderilmedi, email adresi geçersiz: ';
$PHPMAILER_LANG['provide_address'] = 'En az bir tane mail adresi belirtmek zorundasınız alıcının email adresi.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailler desteklenmemektedir.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: alıcılara ulaımadı: ';
$PHPMAILER_LANG['empty_message'] = 'Mesajın içeriği boş';
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen karakter kodlama: ';
$PHPMAILER_LANG['execute'] = 'Çalıştırılamadı: ';
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemedi: ';
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamadı: ';
$PHPMAILER_LANG['from_failed'] = 'Belirtilen adreslere gönderme başarısız: ';
$PHPMAILER_LANG['instantiate'] = 'Örnek e-posta fonksiyonu oluşturulamadı.';
$PHPMAILER_LANG['invalid_address'] = 'Geçersiz e-posta adresi: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.';
$PHPMAILER_LANG['provide_address'] = 'En az bir alıcı e-posta adresi belirtmelisiniz.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: ';
$PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP bağlantı() başarısız.';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
$PHPMAILER_LANG['variable_set'] = 'Ayarlanamıyor yada sıfırlanamıyor: ';
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';

View File

@ -0,0 +1,25 @@
<?php
/**
* PHPMailer language file: refer to English translation for definitive list.
* Vietnamese (Tiếng Việt) Version
* @author VINADES.,JSC <contact@vinades.vn>
* @license GNU/GPL version 2 or GNU/LGPL version 2.1 or any later version
*/
$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.';
$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.';
$PHPMAILER_LANG['empty_message'] = 'Không có nội dung';
$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: ';
$PHPMAILER_LANG['execute'] = 'Không thực hiện được: ';
$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin ';
$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: ';
$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: ';
$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.';
$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng';
$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.';
$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.';
$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: ';
$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP';
$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp ';
$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: ';

View File

@ -3,23 +3,24 @@
* PHPMailer language file: refer to English translation for definitive list
* Traditional Chinese Version
* @author liqwei <liqwei@liqwei.com>
* @author Peter Dave Hello <https://github.com/PeterDaveHello/>
*/
$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['authenticate'] = 'SMTP 錯誤:登失敗。';
$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連到 SMTP 主機。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。';
$PHPMAILER_LANG['empty_message'] = '郵件內容為空';
$PHPMAILER_LANG['encoding'] = '未知編碼: ';
$PHPMAILER_LANG['file_access'] = '無法訪問文件';
$PHPMAILER_LANG['file_open'] = '文件錯誤:無法打開文件';
$PHPMAILER_LANG['file_access'] = '無法存取檔案';
$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案';
$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
$PHPMAILER_LANG['execute'] = '無法執行:';
$PHPMAILER_LANG['instantiate'] = '未知函數調用。';
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。';
$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: ';
$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
$PHPMAILER_LANG['mailer_not_supported'] = '發信客戶端不被支持。';
$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['signing'] = '登入失敗: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP連線失敗';
$PHPMAILER_LANG['smtp_error'] = 'SMTP伺服器錯誤: ';
$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: ';

View File

@ -3,23 +3,24 @@
* PHPMailer language file: refer to English translation for definitive list
* Simplified Chinese Version
* @author liqwei <liqwei@liqwei.com>
* @author young <masxy@foxmail.com> blogbinaryoung.com
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
//$P$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'] = '发送地址错误:';
$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。';
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
$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['signing'] = '登录失败:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错: ';
$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';

View File

@ -0,0 +1,5 @@
<?php
require_once 'vendor/autoload.php';
spl_autoload_register(function ($class) {
require_once strtr($class, '\\_', '//').'.php';
});

0
libraries/vendor/phpmailer/phpmailer/test/fakepopserver.sh vendored Normal file → Executable file
View File

0
libraries/vendor/phpmailer/phpmailer/test/fakesendmail.sh vendored Normal file → Executable file
View File

View File

@ -1,18 +1,19 @@
<?php
/**
* PHPMailer - language file tests
* Before running these tests you need to install PHPUnit 3.3 or later through pear, like this:
* pear install "channel://pear.phpunit.de/PHPUnit"
* Then run the tests like this:
* phpunit phpmailerLangTest
* Requires PHPUnit 3.3 or later.
*
* PHP version 5.0.0
*
* @package PHPMailer
* @author Andy Prevost
* @author Marcus Bointon
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
* @copyright 2004 - 2009 Andy Prevost
* @copyright 2010 Marcus Bointon
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*/
require 'PHPUnit/Autoload.php';
require_once '../PHPMailerAutoload.php';
/**
* PHPMailer - PHP email transport unit test class
@ -21,33 +22,12 @@ require 'PHPUnit/Autoload.php';
class PHPMailerLangTest extends PHPUnit_Framework_TestCase
{
/**
* Holds the default phpmailer instance.
* Holds a phpmailer instance.
* @private
* @var PHPMailer
*/
public $Mail;
/**
* Holds the SMTP mail host.
* @public
* @var string
*/
public $Host = "";
/**
* Holds the change log.
* @private
* @var string[]
*/
public $ChangeLog = array();
/**
* Holds the note log.
* @private
* @var string[]
*/
public $NoteLog = array();
/**
* @var string Default include path
*/
@ -58,231 +38,13 @@ class PHPMailerLangTest extends PHPUnit_Framework_TestCase
*/
public function setUp()
{
if (file_exists('./testbootstrap.php')) {
include './testbootstrap.php'; //Overrides go in here
}
require_once $this->INCLUDE_DIR . 'class.phpmailer.php';
$this->Mail = new PHPMailer;
$this->Mail->Priority = 3;
$this->Mail->Encoding = "8bit";
$this->Mail->CharSet = "iso-8859-1";
if (array_key_exists('mail_from', $_REQUEST)) {
$this->Mail->From = $_REQUEST['mail_from'];
} else {
$this->Mail->From = 'unit_test@phpmailer.example.com';
}
$this->Mail->FromName = "Unit Tester";
$this->Mail->Sender = "";
$this->Mail->Subject = "Unit Test";
$this->Mail->Body = "";
$this->Mail->AltBody = "";
$this->Mail->WordWrap = 0;
if (array_key_exists('mail_host', $_REQUEST)) {
$this->Mail->Host = $_REQUEST['mail_host'];
} else {
$this->Mail->Host = 'mail.example.com';
}
if (array_key_exists('mail_port', $_REQUEST)) {
$this->Mail->Port = $_REQUEST['mail_port'];
} else {
$this->Mail->Port = 25;
}
$this->Mail->Helo = "localhost.localdomain";
$this->Mail->SMTPAuth = false;
$this->Mail->Username = "";
$this->Mail->Password = "";
$this->Mail->PluginDir = $this->INCLUDE_DIR;
$this->Mail->addReplyTo("no_reply@phpmailer.example.com", "Reply Guy");
$this->Mail->Sender = "unit_test@phpmailer.example.com";
if (strlen($this->Mail->Host) > 0) {
$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');
}
if (array_key_exists('mail_cc', $_REQUEST) and strlen($_REQUEST['mail_cc']) > 0) {
$this->setAddress($_REQUEST['mail_cc'], 'Carbon User', 'cc');
}
}
/**
* Run after each test is completed.
*/
public function tearDown()
{
// Clean global variables
$this->Mail = null;
$this->ChangeLog = array();
$this->NoteLog = array();
}
/**
* Build the body of the message in the appropriate format.
* @private
* @returns void
*/
public function buildBody()
{
$this->CheckChanges();
// Determine line endings for message
if ($this->Mail->ContentType == "text/html" || strlen($this->Mail->AltBody) > 0) {
$eol = "<br/>";
$bullet = "<li>";
$bullet_start = "<ul>";
$bullet_end = "</ul>";
} else {
$eol = "\n";
$bullet = " - ";
$bullet_start = "";
$bullet_end = "";
}
$ReportBody = "";
$ReportBody .= "---------------------" . $eol;
$ReportBody .= "Unit Test Information" . $eol;
$ReportBody .= "---------------------" . $eol;
$ReportBody .= "phpmailer version: " . $this->Mail->Version . $eol;
$ReportBody .= "Content Type: " . $this->Mail->ContentType . $eol;
if (strlen($this->Mail->Host) > 0) {
$ReportBody .= "Host: " . $this->Mail->Host . $eol;
}
// If attachments then create an attachment list
$attachments = $this->Mail->getAttachments();
if (count($attachments) > 0) {
$ReportBody .= "Attachments:" . $eol;
$ReportBody .= $bullet_start;
foreach ($attachments as $attachment) {
$ReportBody .= $bullet . "Name: " . $attachment[1] . ", ";
$ReportBody .= "Encoding: " . $attachment[3] . ", ";
$ReportBody .= "Type: " . $attachment[4] . $eol;
}
$ReportBody .= $bullet_end . $eol;
}
// If there are changes then list them
if (count($this->ChangeLog) > 0) {
$ReportBody .= "Changes" . $eol;
$ReportBody .= "-------" . $eol;
$ReportBody .= $bullet_start;
for ($i = 0; $i < count($this->ChangeLog); $i++) {
$ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" .
$this->ChangeLog[$i][1] . "]" . $eol;
}
$ReportBody .= $bullet_end . $eol . $eol;
}
// If there are notes then list them
if (count($this->NoteLog) > 0) {
$ReportBody .= "Notes" . $eol;
$ReportBody .= "-----" . $eol;
$ReportBody .= $bullet_start;
for ($i = 0; $i < count($this->NoteLog); $i++) {
$ReportBody .= $bullet . $this->NoteLog[$i] . $eol;
}
$ReportBody .= $bullet_end;
}
// Re-attach the original body
$this->Mail->Body .= $eol . $eol . $ReportBody;
}
/**
* Check which default settings have been changed for the report.
* @private
* @returns void
*/
public function checkChanges()
{
if ($this->Mail->Priority != 3) {
$this->addChange("Priority", $this->Mail->Priority);
}
if ($this->Mail->Encoding != "8bit") {
$this->addChange("Encoding", $this->Mail->Encoding);
}
if ($this->Mail->CharSet != "iso-8859-1") {
$this->addChange("CharSet", $this->Mail->CharSet);
}
if ($this->Mail->Sender != "") {
$this->addChange("Sender", $this->Mail->Sender);
}
if ($this->Mail->WordWrap != 0) {
$this->addChange("WordWrap", $this->Mail->WordWrap);
}
if ($this->Mail->Mailer != "mail") {
$this->addChange("Mailer", $this->Mail->Mailer);
}
if ($this->Mail->Port != 25) {
$this->addChange("Port", $this->Mail->Port);
}
if ($this->Mail->Helo != "localhost.localdomain") {
$this->addChange("Helo", $this->Mail->Helo);
}
if ($this->Mail->SMTPAuth) {
$this->addChange("SMTPAuth", "true");
}
}
/**
* Add a changelog entry.
* @access private
* @param string $sName
* @param string $sNewValue
* @return void
*/
public function addChange($sName, $sNewValue)
{
$this->ChangeLog[] = array($sName, $sNewValue);
}
/**
* Adds a simple note to the message.
* @public
* @param string $sValue
* @return void
*/
public function addNote($sValue)
{
$this->NoteLog[] = $sValue;
}
/**
* Adds all of the addresses
* @access public
* @param string $sAddress
* @param string $sName
* @param string $sType
* @return boolean
*/
public function setAddress($sAddress, $sName = '', $sType = 'to')
{
switch ($sType) {
case 'to':
return $this->Mail->addAddress($sAddress, $sName);
case 'cc':
return $this->Mail->addCC($sAddress, $sName);
case "bcc":
return $this->Mail->addBCC($sAddress, $sName);
}
return false;
}
/**
* Test language files for missing and excess translations
* All languages are compared with English
* @group languages
*/
public function testTranslations()
{
@ -312,29 +74,3 @@ class PHPMailerLangTest extends PHPUnit_Framework_TestCase
$this->assertEmpty($err, $err);
}
}
/**
* This is a sample form for setting appropriate test values through a browser
* These values can also be set using a file called testbootstrap.php (not in svn) in the same folder as this script
* which is probably more useful if you run these tests a lot
* <html>
* <body>
* <h3>phpmailer Unit Test</h3>
* By entering a SMTP hostname it will automatically perform tests with SMTP.
*
* <form name="phpmailer_unit" action=__FILE__ method="get">
* <input type="hidden" name="submitted" value="1"/>
* From Address: <input type="text" size="50" name="mail_from" value="<?php echo get("mail_from"); ?>"/>
* <br/>
* To Address: <input type="text" size="50" name="mail_to" value="<?php echo get("mail_to"); ?>"/>
* <br/>
* Cc Address: <input type="text" size="50" name="mail_cc" value="<?php echo get("mail_cc"); ?>"/>
* <br/>
* SMTP Hostname: <input type="text" size="50" name="mail_host" value="<?php echo get("mail_host"); ?>"/>
* <p/>
* <input type="submit" value="Run Test"/>
*
* </form>
* </body>
* </html>
*/

View File

@ -1,10 +1,7 @@
<?php
/**
* PHPMailer - PHP email transport unit tests
* Requires PHPUnit 3.3 or later. Install like this:
* pear install "channel://pear.phpunit.de/PHPUnit"
* Then run the tests like this:
* phpunit phpmailerTest
* Requires PHPUnit 3.3 or later.
*
* PHP version 5.0.0
*
@ -12,11 +9,11 @@
* @author Andy Prevost
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
* @copyright 2004 - 2009 Andy Prevost
* @copyright 2010 Marcus Bointon
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*/
require 'PHPUnit/Autoload.php';
require '../PHPMailerAutoload.php';
require_once '../PHPMailerAutoload.php';
/**
* PHPMailer - PHP email transport unit test class
@ -74,6 +71,7 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
include './testbootstrap.php'; //Overrides go in here
}
$this->Mail = new PHPMailer;
$this->Mail->SMTPDebug = 4; //Full debug output
$this->Mail->Priority = 3;
$this->Mail->Encoding = '8bit';
$this->Mail->CharSet = 'iso-8859-1';
@ -743,7 +741,7 @@ class PHPMailerTest extends PHPUnit_Framework_TestCase
$this->Mail->isHTML(true);
$this->Mail->Subject .= ": HTML only";
$this->Mail->Body = <<<'EOT'
$this->Mail->Body = <<<EOT
<html>
<head>
<title>HTML email test</title>
@ -976,6 +974,25 @@ EOT;
$this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
}
/**
* Test sending using Qmail
*/
public function testQmailSend()
{
//Only run if we have qmail installed
if (file_exists('/var/qmail/bin/qmail-inject')) {
$this->Mail->Body = 'Sending via qmail';
$this->BuildBody();
$subject = $this->Mail->Subject;
$this->Mail->Subject = $subject . ': qmail';
$this->Mail->IsQmail();
$this->assertTrue($this->Mail->Send(), $this->Mail->ErrorInfo);
} else {
$this->markTestSkipped('Qmail is not installed');
}
}
/**
* Test sending using PHP mail() function
*/
@ -1026,27 +1043,6 @@ EOT;
$this->Mail->smtpClose();
}
/**
* Test SMTP host connections
*/
public function testSmtpConnect()
{
$this->assertTrue($this->Mail->smtpConnect(), 'SMTP single connect failed');
$this->Mail->smtpClose();
$this->Mail->Host = "localhost:12345;10.10.10.10:54321";
$this->assertFalse($this->Mail->smtpConnect(), 'SMTP bad multi-connect succeeded');
$this->Mail->smtpClose();
$this->Mail->Host = "localhost:12345;10.10.10.10:54321;" . $_REQUEST['mail_host'];
$this->assertTrue($this->Mail->smtpConnect(), 'SMTP multi-connect failed');
$this->Mail->smtpClose();
$this->Mail->Host = $_REQUEST['mail_host'];
//Need to pick a harmless option so as not cause problems of its own! socket:bind doesn't work with Travis-CI
$this->assertTrue(
$this->Mail->smtpConnect(array('ssl' => array('verify_depth' => 10))),
'SMTP connect with options failed'
);
}
/**
* Tests this denial of service attack:
* http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
@ -1242,7 +1238,6 @@ EOT;
$this->Mail->Subject .= ': DKIM signing';
$this->Mail->Body = 'This message is DKIM signed.';
$this->buildBody();
//$this->Mail->SMTPDebug = 2;
$privatekeyfile = 'dkim_private.key';
//Make a new key pair
//(2048 bits is the recommended minimum key length -
@ -1278,48 +1273,6 @@ EOT;
$this->assertEquals($target, PHPMailer::normalizeBreaks($mixedsrc), 'Mixed break reformatting failed');
}
/**
* Use a fake POP3 server to test POP-before-SMTP auth
* With a known-good login
*/
public function testPopBeforeSmtpGood()
{
//Start a fake POP server
$pid = shell_exec('nohup ./runfakepopserver.sh >/dev/null 2>/dev/null & printf "%u" $!');
$this->pids[] = $pid;
sleep(2);
//Test a known-good login
$this->assertTrue(
POP3::popBeforeSmtp('localhost', 1100, 10, 'user', 'test', 0),
'POP before SMTP failed'
);
//Kill the fake server
shell_exec('kill -TERM '.escapeshellarg($pid));
sleep(2);
}
/**
* Use a fake POP3 server to test POP-before-SMTP auth
* With a known-bad login
*/
public function testPopBeforeSmtpBad()
{
//Start a fake POP server on a different port
//so we don't inadvertently connect to the previous instance
$pid = shell_exec('nohup ./runfakepopserver.sh 1101 >/dev/null 2>/dev/null & printf "%u" $!');
$this->pids[] = $pid;
sleep(2);
//Test a known-bad login
$this->assertFalse(
POP3::popBeforeSmtp('localhost', 1101, 10, 'user', 'xxx', 0),
'POP before SMTP should have failed'
);
shell_exec('kill -TERM '.escapeshellarg($pid));
sleep(2);
}
/**
* Test setting and retrieving message ID
*/
@ -1373,6 +1326,73 @@ EOT;
$this->assertEquals($q['extension'], 'mp3', 'Windows extension not matched');
$this->assertEquals($q['filename'], '飛兒樂 團光茫', 'Windows filename not matched');
}
/**
* Use a fake POP3 server to test POP-before-SMTP auth
* With a known-good login
*/
public function testPopBeforeSmtpGood()
{
//Start a fake POP server
$pid = shell_exec('nohup ./runfakepopserver.sh >/dev/null 2>/dev/null & printf "%u" $!');
$this->pids[] = $pid;
sleep(2);
//Test a known-good login
$this->assertTrue(
POP3::popBeforeSmtp('localhost', 1100, 10, 'user', 'test', 0),
'POP before SMTP failed'
);
//Kill the fake server
shell_exec('kill -TERM '.escapeshellarg($pid));
sleep(2);
}
/**
* Use a fake POP3 server to test POP-before-SMTP auth
* With a known-bad login
*/
public function testPopBeforeSmtpBad()
{
//Start a fake POP server on a different port
//so we don't inadvertently connect to the previous instance
$pid = shell_exec('nohup ./runfakepopserver.sh 1101 >/dev/null 2>/dev/null & printf "%u" $!');
$this->pids[] = $pid;
sleep(2);
//Test a known-bad login
$this->assertFalse(
POP3::popBeforeSmtp('localhost', 1101, 10, 'user', 'xxx', 0),
'POP before SMTP should have failed'
);
shell_exec('kill -TERM '.escapeshellarg($pid));
sleep(2);
}
/**
* Test SMTP host connections.
* This test can take a long time, so run it last
*/
public function testSmtpConnect()
{
$this->assertTrue($this->Mail->smtpConnect(), 'SMTP single connect failed');
$this->Mail->smtpClose();
$this->Mail->Host = "ssl://localhost:12345;tls://localhost:587;10.10.10.10:54321;localhost:12345;10.10.10.10";
$this->assertFalse($this->Mail->smtpConnect(), 'SMTP bad multi-connect succeeded');
$this->Mail->smtpClose();
$this->Mail->Host = "localhost:12345;10.10.10.10:54321;" . $_REQUEST['mail_host'];
$this->assertTrue($this->Mail->smtpConnect(), 'SMTP multi-connect failed');
$this->Mail->smtpClose();
$this->Mail->Host = " localhost:12345 ; " . $_REQUEST['mail_host'] . ' ';
$this->assertTrue($this->Mail->smtpConnect(), 'SMTP hosts with stray spaces failed');
$this->Mail->smtpClose();
$this->Mail->Host = $_REQUEST['mail_host'];
//Need to pick a harmless option so as not cause problems of its own! socket:bind doesn't work with Travis-CI
$this->assertTrue(
$this->Mail->smtpConnect(array('ssl' => array('verify_depth' => 10))),
'SMTP connect with options failed'
);
}
}
/**

0
libraries/vendor/phpmailer/phpmailer/test/runfakepopserver.sh vendored Normal file → Executable file
View File

View File

@ -45,7 +45,7 @@ try {
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
$mail->msgHTML(file_get_contents('../examples/contents.html'));
$mail->addAttachment('../examples/images/phpmailer.png'); // attachment
$mail->addAttachment('../examples/images/phpmailer_mini.gif'); // attachment
$mail->addAttachment('../examples/images/phpmailer_mini.png'); // attachment
$mail->action_function = 'callbackAction';
$mail->send();
echo "Message Sent OK</p>\n";

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
verbose="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
colors="false"
forceCoversAnnotation="false"
strict="false"
processIsolation="false">
<testsuites>
<testsuite name="PHPMailer Tests">
<directory>./test/</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<directory suffix=".php">./extras</directory>
</blacklist>
</filter>
<groups>
<exclude>
<group>languages</group>
</exclude>
</groups>
<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" logIncompleteSkipped="false"/>
</logging>
</phpunit>