[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
+[](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/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
+- Used by many open-source projects: WordPress, Drupal, 1CRM, 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
- Multipart/alternative emails for mail clients that do not read HTML email
- 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
+- SMTP authentication with LOGIN, PLAIN, NTLM, CRAM-MD5 and Google's XOAUTH2 mechanisms over SSL and TLS transports
+- Error messages in 47 languages!
- DKIM and S/MIME signing support
- Compatible with PHP 5.0 and later
- Much more!
## License
-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
+This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read LICENSE for information on the
software availability and distribution.
## 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 is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), so just add this line to your `composer.json` file:
+
+```json
+"phpmailer/phpmailer": "~5.2"
+```
+
+or
+
+```sh
+composer require phpmailer/phpmailer
+```
+
+If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package.
+
+Alternatively, 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.
+
+If you're not using composer's autoloader, 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 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.
+If you want to use Google's XOAUTH2 authentication mechanism, you need to be running at least PHP 5.4, and load the dependencies listed in `composer.json`.
+
### 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 as otherwise you will either have to `require` all classes manually or use some other autoloader. 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.
+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 as otherwise you will either have to `require` all classes manually or use some other autoloader. 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 and ics generation. If you're using Google XOAUTH2 you will need `class.phpmaileroauth.php` and `class.oauth.php` classes too, as well as the composer dependencies.
## A Simple Example
$mail->addCC('cc@example.com');
$mail->addBCC('bcc@example.com');
-$mail->WordWrap = 50; // Set word wrap to 50 characters
$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML
That's it. You should now be ready to use PHPMailer!
## Localization
-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:
+PHPMailer defaults to English, but in the [language](language/) folder you'll find numerous (46 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
## Documentation
-Generated documentation is [available online](http://phpmailer.github.io/PHPMailer/).
+Examples of how to use PHPMailer for common scenarios can be found in the [examples](examples/) folder. If you're looking for a good starting point, we recommend you start with [the gmail example](examples/gmail.phps).
+
+There are tips and a troubleshooting guide in the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated.
+
+Complete generated API 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.
+If the documentation doesn't cover what you need, search the [many questions on StackOverflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
+
## Tests
There is a PHPUnit test script in the [test](test/) folder.
With the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
-`git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git`
+```sh
+git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
+```
Please *don't* use the SourceForge or Google Code projects any more.
+## Sponsorship
+
+Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system.
+
+<a href="https://info.smartmessages.net/"><img src="https://www.smartmessages.net/img/smartmessages-logo.svg" width="250" height="28" alt="Smartmessages email marketing"></a>
+
+Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰.
+
## Changelog
See [changelog](changelog.md).
-Description of PHPMailer 5.2.9 library import into Moodle
+Description of PHPMailer 5.2.13 library import into Moodle
We now use a vanilla version of phpmailer and do our customisations in a
subclass.
When doing the import we remove directories/files:
aboutus.html
class.pop3.php
+class.phpmailer.oauth.php
+class.phpmailer.oauthgoogle.php
+get_oauth_token.php
.travis.yml
.scrutinizer.yml
composer.json
+composer.lock
travis.phpunit.xml.dist
PHPMailerAutoload.php (make sure all files are included in moodle_phpmailer.php)
docs/
--- /dev/null
+5.2.13
\ No newline at end of file
# ChangeLog
+## Version 5.2.13 (Sep 14th 2015)
+* Rename internal oauth class to avoid name clashes
+* Improve Estonian translations
+
+## Version 5.2.12 (Sep 1st 2015)
+* Fix incorrect composer package dependencies
+* Skip existing embedded image `cid`s in `msgHTML`
+
+## Version 5.2.11 (Aug 31st 2015)
+* Don't switch to quoted-printable for long lines if already using base64
+* Fixed Travis-CI config when run on PHP 7
+* Added Google XOAUTH2 authentication mechanism, thanks to @sherryl4george
+* Add address parser for RFC822-format addresses
+* Update MS Office MIME types
+* Don't convert line breaks when using quoted-printable encoding
+* Handle MS Exchange returning an invalid empty AUTH-type list in EHLO
+* Don't set name or filename properties on MIME parts that don't have one
+
+## Version 5.2.10 (May 4th 2015)
+* Add custom header getter
+* Use `application/javascript` for .js attachments
+* Improve RFC2821 compliance for timelimits, especially for end-of-data
+* Add Azerbaijani translations (Thanks to @mirjalal)
+* Minor code cleanup for robustness
+* Add Indonesian translations (Thanks to @ceceprawiro)
+* Avoid `error_log` Debugoutput naming clash
+* Add ability to parse server capabilities in response to EHLO (useful for SendGrid etc)
+* Amended default values for WordWrap to match RFC
+* Remove html2text converter class (has incompatible license)
+* Provide new mechanism for injecting html to text converters
+* Improve pointers to docs and support in README
+* Add example file upload script
+* Refactor and major cleanup of EasyPeasyICS, now a lot more usable
+* Make set() method simpler and more reliable
+* Add Malay translation (Thanks to @nawawi)
+* Add Bulgarian translation (Thanks to @mialy)
+* Add Armenian translation (Thanks to Hrayr Grigoryan)
+* Add Slovenian translation (Thanks to Klemen Tušar)
+* More efficient word wrapping
+* Add support for S/MIME signing with additional CA certificate (thanks to @IgitBuh)
+* Fix incorrect MIME structure when using S/MIME signing and isMail() (#372)
+* Improved checks and error messages for missing extensions
+* Store and report SMTP errors more consistently
+* Add MIME multipart preamble for better Outlook compatibility
+* Enable TLS encryption automatically if the server offers it
+* Provide detailed errors when individual recipients fail
+* Report more errors when connecting
+* Add extras classes to composer classmap
+* Expose stream_context_create options via new SMTPOptions property
+* Automatic encoding switch to quoted-printable if message lines are too long
+* Add Korean translation (Thanks to @ChalkPE)
+* Provide a pointer to troubleshooting docs on SMTP connection failure
+
## Version 5.2.9 (Sept 25th 2014)
* **Important: The autoloader is no longer autoloaded by the PHPMailer class**
* Update html2text from https://github.com/mtibben/html2text
* Better default behaviour for validateAddress
## Version 5.2.7 (September 12th 2013)
-* Add Ukranian translation from @Krezalis
+* Add Ukrainian translation from @Krezalis
* Support for do_verp
* Fix bug in CRAM-MD5 AUTH
* Propagate Debugoutput option to SMTP class (@Reblutus)
## Version 1.15 (Fri, Jun 15 2001)
Note: these changes contributed by Patrice Fournier
* Changed all remaining \n to \r\n
-* Bcc: header no longer writen to message except
+* Bcc: header no longer written to message except
when sent directly to sendmail
* Added a small message to non-MIME compliant mail reader
* Added Sender variable to change the Sender email
* The PHPMailer Version number.
* @type string
*/
- public $Version = '5.2.9';
+ public $Version = '5.2.13';
/**
* Email priority.
- * Options: 1 = High, 3 = Normal, 5 = low.
+ * Options: null (default), 1 = High, 3 = Normal, 5 = low.
+ * When null, the header is not set at all.
* @type integer
*/
- public $Priority = 3;
+ public $Priority = null;
/**
* The character set of the message.
/**
* Word-wrap the message body to this number of chars.
+ * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.
* @type integer
*/
public $WordWrap = 0;
public $Helo = '';
/**
- * The secure connection prefix.
- * Options: "", "ssl" or "tls"
+ * What kind of encryption to use on the SMTP connection.
+ * Options: '', 'ssl' or 'tls'
* @type string
*/
public $SMTPSecure = '';
+ /**
+ * Whether to enable TLS encryption automatically if a server supports it,
+ * even if `SMTPSecure` is not set to 'tls'.
+ * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.
+ * @type boolean
+ */
+ public $SMTPAutoTLS = true;
+
/**
* Whether to use SMTP authentication.
* Uses the Username and Password properties.
*/
public $SMTPAuth = false;
+ /**
+ * Options array passed to stream_context_create when connecting via SMTP.
+ * @type array
+ */
+ public $SMTPOptions = array();
+
/**
* SMTP username.
* @type string
/**
* The SMTP server timeout in seconds.
+ * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
* @type integer
*/
- public $Timeout = 10;
+ public $Timeout = 300;
/**
* SMTP class debug output mode.
public $action_function = '';
/**
- * What to use in the X-Mailer header.
- * Options: null for default, whitespace for none, or a string to use
+ * What to put in the X-Mailer header.
+ * Options: An empty string for PHPMailer default, whitespace for none, or a string to use
* @type string
*/
public $XMailer = '';
-
+
+ /**
+ * Only For XOAUTH - Google
+ * Options: An empty string for PHPMailer default, Enter the email used to get access token
+ * @type string
+ */
+// public $UserEmail = '';
+// public $RefreshToken = '';
+// public $ClientId = '';
+// public $ClientSecret = '';
+
+
/**
* An instance of the SMTP sender class.
* @type SMTP
/**
* An array of all kinds of addresses.
- * Includes all of $to, $cc, $bcc, $replyto
+ * Includes all of $to, $cc, $bcc
* @type array
* @access protected
*/
*/
protected $sign_key_file = '';
+ /**
+ * The optional S/MIME extra certificates ("CA Chain") file path.
+ * @type string
+ * @access protected
+ */
+ protected $sign_extracerts_file = '';
+
/**
* The S/MIME password for the key.
* Used only if the key is encrypted.
*/
protected $exceptions = false;
+ /**
+ * Unique ID used for message ID and boundaries.
+ * @type string
+ * @access protected
+ */
+ protected $uniqueid = '';
+
/**
* Error severity: message only, continue processing.
*/
*/
const CRLF = "\r\n";
+ /**
+ * The maximum line length allowed by RFC 2822 section 2.1.1
+ * @type integer
+ */
+ const MAX_LINE_LENGTH = 998;
+
/**
* Constructor.
* @param boolean $exceptions Should we throw external exceptions?
*/
public function __construct($exceptions = false)
{
- $this->exceptions = ($exceptions == true);
+ $this->exceptions = (boolean)$exceptions;
}
/**
*/
public function __destruct()
{
- if ($this->Mailer == 'smtp') { //close any open SMTP connection nicely
+ //Close any open SMTP connection nicely
+ if ($this->Mailer == 'smtp') {
$this->smtpClose();
}
}
if ($this->SMTPDebug <= 0) {
return;
}
- if (is_callable($this->Debugoutput)) {
+ //Avoid clash with built-in function names
+ if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
call_user_func($this->Debugoutput, $str, $this->SMTPDebug);
return;
}
return false;
}
+ /**
+ * Parse and validate a string containing one or more RFC822-style comma-separated email addresses
+ * of the form "display name <address>" into an array of name/address pairs.
+ * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
+ * Note that quotes in the name part are removed.
+ * @param string $addrstr The address list string
+ * @param bool $useimap Whether to use the IMAP extension to parse the list
+ * @return array
+ * @link http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
+ */
+ public function parseAddresses($addrstr, $useimap = true)
+ {
+ $addresses = array();
+ if ($useimap and function_exists('imap_rfc822_parse_adrlist')) {
+ //Use this built-in parser if it's available
+ $list = imap_rfc822_parse_adrlist($addrstr, '');
+ foreach ($list as $address) {
+ if ($address->host != '.SYNTAX-ERROR.') {
+ if ($this->validateAddress($address->mailbox . '@' . $address->host)) {
+ $addresses[] = array(
+ 'name' => (property_exists($address, 'personal') ? $address->personal : ''),
+ 'address' => $address->mailbox . '@' . $address->host
+ );
+ }
+ }
+ }
+ } else {
+ //Use this simpler parser
+ $list = explode(',', $addrstr);
+ foreach ($list as $address) {
+ $address = trim($address);
+ //Is there a separate name part?
+ if (strpos($address, '<') === false) {
+ //No separate name, just use the whole thing
+ if ($this->validateAddress($address)) {
+ $addresses[] = array(
+ 'name' => '',
+ 'address' => $address
+ );
+ }
+ } else {
+ list($name, $email) = explode('<', $address);
+ $email = trim(str_replace('>', '', $email));
+ if ($this->validateAddress($email)) {
+ $addresses[] = array(
+ 'name' => trim(str_replace(array('"', "'"), '', $name)),
+ 'address' => $email
+ );
+ }
+ }
+ }
+ }
+ return $addresses;
+ }
+
/**
* Set the From and FromName properties.
* @param string $address
$this->ContentType = 'multipart/alternative';
}
- $this->error_count = 0; // reset errors
+ $this->error_count = 0; // Reset errors
$this->setMessageType();
// Refuse to send an empty message unless we are specifically allowing it
if (!$this->AllowEmpty and empty($this->Body)) {
throw new phpmailerException($this->lang('empty_message'), self::STOP_CRITICAL);
}
- $this->MIMEHeader = $this->createHeader();
+ // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding)
+ $this->MIMEHeader = '';
$this->MIMEBody = $this->createBody();
+ // createBody may have added some headers, so retain them
+ $tempheaders = $this->MIMEHeader;
+ $this->MIMEHeader = $this->createHeader();
+ $this->MIMEHeader .= $tempheaders;
// To capture the complete message when using mail(), create
// an extra header list which createHeader() doesn't fold in
if (!empty($this->DKIM_domain)
&& !empty($this->DKIM_private)
&& !empty($this->DKIM_selector)
- && !empty($this->DKIM_domain)
&& file_exists($this->DKIM_private)) {
$header_dkim = $this->DKIM_Add(
$this->MIMEHeader . $this->mailHeader,
str_replace("\r\n", "\n", $header_dkim) . self::CRLF;
}
return true;
-
} catch (phpmailerException $exc) {
$this->setError($exc->getMessage());
if ($this->exceptions) {
$sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
}
}
- if ($this->SingleTo === true) {
+ if ($this->SingleTo) {
foreach ($this->SingleToArray as $toAddr) {
if (!@$mail = popen($sendmail, 'w')) {
throw new phpmailerException($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
ini_set('sendmail_from', $this->Sender);
}
$result = false;
- if ($this->SingleTo === true && count($toArr) > 1) {
+ if ($this->SingleTo && count($toArr) > 1) {
foreach ($toArr as $toAddr) {
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
$this->doCallback($result, array($toAddr), $this->cc, $this->bcc, $this->Subject, $body, $this->From);
protected function smtpSend($header, $body)
{
$bad_rcpt = array();
-
- if (!$this->smtpConnect()) {
+ if (!$this->smtpConnect($this->SMTPOptions)) {
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
}
- $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
+ if ('' == $this->Sender) {
+ $smtp_from = $this->From;
+ } else {
+ $smtp_from = $this->Sender;
+ }
if (!$this->smtp->mail($smtp_from)) {
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
throw new phpmailerException($this->ErrorInfo, self::STOP_CRITICAL);
}
// Attempt to send to all recipients
- foreach ($this->to as $to) {
- if (!$this->smtp->recipient($to[0])) {
- $bad_rcpt[] = $to[0];
- $isSent = false;
- } else {
- $isSent = true;
- }
- $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From);
- }
- foreach ($this->cc as $cc) {
- if (!$this->smtp->recipient($cc[0])) {
- $bad_rcpt[] = $cc[0];
- $isSent = false;
- } else {
- $isSent = true;
- }
- $this->doCallback($isSent, array(), array($cc[0]), array(), $this->Subject, $body, $this->From);
- }
- foreach ($this->bcc as $bcc) {
- if (!$this->smtp->recipient($bcc[0])) {
- $bad_rcpt[] = $bcc[0];
- $isSent = false;
- } else {
- $isSent = true;
+ foreach (array($this->to, $this->cc, $this->bcc) as $togroup) {
+ foreach ($togroup as $to) {
+ if (!$this->smtp->recipient($to[0])) {
+ $error = $this->smtp->getError();
+ $bad_rcpt[] = array('to' => $to[0], 'error' => $error['detail']);
+ $isSent = false;
+ } else {
+ $isSent = true;
+ }
+ $this->doCallback($isSent, array($to[0]), array(), array(), $this->Subject, $body, $this->From);
}
- $this->doCallback($isSent, array(), array(), array($bcc[0]), $this->Subject, $body, $this->From);
}
// Only send the DATA command if we have viable recipients
if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) {
throw new phpmailerException($this->lang('data_not_accepted'), self::STOP_CRITICAL);
}
- if ($this->SMTPKeepAlive == true) {
+ if ($this->SMTPKeepAlive) {
$this->smtp->reset();
} else {
$this->smtp->quit();
$this->smtp->close();
}
- if (count($bad_rcpt) > 0) { // Create error message for any bad addresses
+ //Create error message for any bad addresses
+ if (count($bad_rcpt) > 0) {
+ $errstr = '';
+ foreach ($bad_rcpt as $bad) {
+ $errstr .= $bad['to'] . ': ' . $bad['error'];
+ }
throw new phpmailerException(
- $this->lang('recipients_failed') . implode(', ', $bad_rcpt),
+ $this->lang('recipients_failed') . $errstr,
self::STOP_CONTINUE
);
}
if (is_null($this->smtp)) {
$this->smtp = $this->getSMTPInstance();
}
-
+
// Already connected?
if ($this->smtp->connected()) {
return true;
// The host string prefix can temporarily override the current setting for SMTPSecure
// If it's not specified, the default value is used
$prefix = '';
+ $secure = $this->SMTPSecure;
$tls = ($this->SMTPSecure == 'tls');
- if ($hostinfo[2] == 'ssl' or ($hostinfo[2] == '' and $this->SMTPSecure == 'ssl')) {
+ if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) {
$prefix = 'ssl://';
- $tls = false; // Can't have SSL and TLS at once
+ $tls = false; // Can't have SSL and TLS at the same time
+ $secure = 'ssl';
} elseif ($hostinfo[2] == 'tls') {
$tls = true;
// tls doesn't use a prefix
+ $secure = 'tls';
+ }
+ //Do we need the OpenSSL extension?
+ $sslext = defined('OPENSSL_ALGO_SHA1');
+ if ('tls' === $secure or 'ssl' === $secure) {
+ //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled
+ if (!$sslext) {
+ throw new phpmailerException($this->lang('extension_missing').'openssl', self::STOP_CRITICAL);
+ }
}
$host = $hostinfo[3];
$port = $this->Port;
$hello = $this->serverHostname();
}
$this->smtp->hello($hello);
-
+ //Automatically enable TLS encryption if:
+ // * it's not disabled
+ // * we have openssl extension
+ // * we are not already using SSL
+ // * the server offers STARTTLS
+ if ($this->SMTPAutoTLS and $sslext and $secure != 'ssl' and $this->smtp->getServerExt('STARTTLS')) {
+ $tls = true;
+ }
if ($tls) {
if (!$this->smtp->startTLS()) {
throw new phpmailerException($this->lang('connect_host'));
}
if ($this->SMTPAuth) {
if (!$this->smtp->authenticate(
- $this->Username,
- $this->Password,
- $this->AuthType,
- $this->Realm,
+ $this->Username,
+ $this->Password,
+ $this->AuthType,
+ $this->Realm,
$this->Workstation
)
) {
return true;
} catch (phpmailerException $exc) {
$lastexception = $exc;
+ $this->edebug($exc->getMessage());
// We must have connected, but then failed TLS or Auth, so close connection nicely
$this->smtp->quit();
}
'signing' => 'Signing Error: ',
'smtp_connect_failed' => 'SMTP connect() failed.',
'smtp_error' => 'SMTP server error: ',
- 'variable_set' => 'Cannot set or reset variable: '
+ 'variable_set' => 'Cannot set or reset variable: ',
+ 'extension_missing' => 'Extension missing: '
);
if (empty($lang_path)) {
// Calculate an absolute path so it can work if CWD is not here
}
$foundlang = true;
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
- if ($langcode != 'en') { // There is no English translation file
+ // There is no English translation file
+ if ($langcode != 'en') {
// Make sure language file path is readable
if (!is_readable($lang_file)) {
$foundlang = false;
} else {
// Overwrite language-specific strings.
- // This way we'll never have missing translations.
+ // This way we'll never have missing translation keys.
$foundlang = include $lang_file;
}
}
$this->language = $PHPMAILER_LANG;
- return ($foundlang == true); // Returns false if language not found
+ return (boolean)$foundlang; // Returns false if language not found
}
/**
*/
public function wrapText($message, $length, $qp_mode = false)
{
- $soft_break = ($qp_mode) ? sprintf(' =%s', $this->LE) : $this->LE;
+ if ($qp_mode) {
+ $soft_break = sprintf(' =%s', $this->LE);
+ } else {
+ $soft_break = $this->LE;
+ }
// If utf-8 encoding is used, we will need to make sure we don't
// split multibyte characters when we wrap
$is_utf8 = (strtolower($this->CharSet) == 'utf-8');
$crlflen = strlen(self::CRLF);
$message = $this->fixEOL($message);
+ //Remove a trailing line break
if (substr($message, -$lelen) == $this->LE) {
$message = substr($message, 0, -$lelen);
}
- $line = explode($this->LE, $message); // Magic. We know fixEOL uses $LE
+ //Split message into lines
+ $lines = explode($this->LE, $message);
+ //Message will be rebuilt in here
$message = '';
- for ($i = 0; $i < count($line); $i++) {
- $line_part = explode(' ', $line[$i]);
+ foreach ($lines as $line) {
+ $words = explode(' ', $line);
$buf = '';
- for ($e = 0; $e < count($line_part); $e++) {
- $word = $line_part[$e];
+ $firstword = true;
+ foreach ($words as $word) {
if ($qp_mode and (strlen($word) > $length)) {
$space_left = $length - strlen($buf) - $crlflen;
- if ($e != 0) {
+ if (!$firstword) {
if ($space_left > 20) {
$len = $space_left;
if ($is_utf8) {
}
} else {
$buf_o = $buf;
- $buf .= ($e == 0) ? $word : (' ' . $word);
+ if (!$firstword) {
+ $buf .= ' ';
+ }
+ $buf .= $word;
if (strlen($buf) > $length and $buf_o != '') {
$message .= $buf_o . $soft_break;
$buf = $word;
}
}
+ $firstword = false;
}
$message .= $buf . self::CRLF;
}
/**
* Find the last character boundary prior to $maxLength in a utf-8
- * quoted (printable) encoded string.
+ * quoted-printable encoded string.
* Original written by Colin Brown.
* @access public
* @param string $encodedText utf-8 QP text
- * @param integer $maxLength find last character boundary prior to this length
+ * @param integer $maxLength Find the last character boundary prior to this length
* @return integer
*/
public function utf8CharBoundary($encodedText, $maxLength)
while (!$foundSplitPos) {
$lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
$encodedCharPos = strpos($lastChunk, '=');
- if ($encodedCharPos !== false) {
+ if (false !== $encodedCharPos) {
// Found start of encoded character byte within $lookBack block.
// Check the encoded byte value (the 2 chars after the '=')
$hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
$dec = hexdec($hex);
- if ($dec < 128) { // Single byte character.
+ if ($dec < 128) {
+ // Single byte character.
// If the encoded char was found at pos 0, it will fit
// otherwise reduce maxLength to start of the encoded char
- $maxLength = ($encodedCharPos == 0) ? $maxLength :
- $maxLength - ($lookBack - $encodedCharPos);
+ if ($encodedCharPos > 0) {
+ $maxLength = $maxLength - ($lookBack - $encodedCharPos);
+ }
$foundSplitPos = true;
- } elseif ($dec >= 192) { // First byte of a multi byte character
+ } elseif ($dec >= 192) {
+ // First byte of a multi byte character
// Reduce maxLength to split at start of character
$maxLength = $maxLength - ($lookBack - $encodedCharPos);
$foundSplitPos = true;
- } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back
+ } elseif ($dec < 192) {
+ // Middle byte of a multi byte character, look further back
$lookBack += 3;
}
} else {
}
/**
- * Set the body wrapping.
+ * Apply word wrapping to the message body.
+ * Wraps the message body to the number of chars set in the WordWrap property.
+ * You should only do this to plain-text bodies as wrapping HTML tags may break them.
+ * This is called automatically by createBody(), so you don't need to call it yourself.
* @access public
* @return void
*/
{
$result = '';
- // Set the boundaries
- $uniq_id = md5(uniqid(time()));
- $this->boundary[1] = 'b1_' . $uniq_id;
- $this->boundary[2] = 'b2_' . $uniq_id;
- $this->boundary[3] = 'b3_' . $uniq_id;
-
if ($this->MessageDate == '') {
$this->MessageDate = self::rfcDate();
}
// To be created automatically by mail()
- if ($this->SingleTo === true) {
+ if ($this->SingleTo) {
if ($this->Mailer != 'mail') {
foreach ($this->to as $toaddr) {
$this->SingleToArray[] = $this->addrFormat($toaddr);
if ($this->MessageID != '') {
$this->lastMessageID = $this->MessageID;
} else {
- $this->lastMessageID = sprintf('<%s@%s>', $uniq_id, $this->ServerHostname());
+ $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->ServerHostname());
+ }
+ $result .= $this->headerLine('Message-ID', $this->lastMessageID);
+ if (!is_null($this->Priority)) {
+ $result .= $this->headerLine('X-Priority', $this->Priority);
}
- $result .= $this->HeaderLine('Message-ID', $this->lastMessageID);
- $result .= $this->headerLine('X-Priority', $this->Priority);
if ($this->XMailer == '') {
$result .= $this->headerLine(
'X-Mailer',
}
// Add custom headers
- for ($index = 0; $index < count($this->CustomHeader); $index++) {
+ foreach ($this->CustomHeader as $header) {
$result .= $this->headerLine(
- trim($this->CustomHeader[$index][0]),
- $this->encodeHeader(trim($this->CustomHeader[$index][1]))
+ trim($header[0]),
+ $this->encodeHeader(trim($header[1]))
);
}
if (!$this->sign_key_file) {
return $this->MIMEHeader . $this->mailHeader . self::CRLF . $this->MIMEBody;
}
-
/**
* Assemble the message body.
* Returns an empty string on failure.
public function createBody()
{
$body = '';
+ //Create unique IDs and preset boundaries
+ $this->uniqueid = md5(uniqid(time()));
+ $this->boundary[1] = 'b1_' . $this->uniqueid;
+ $this->boundary[2] = 'b2_' . $this->uniqueid;
+ $this->boundary[3] = 'b3_' . $this->uniqueid;
if ($this->sign_key_file) {
$body .= $this->getMailMIME() . $this->LE;
$bodyEncoding = $this->Encoding;
$bodyCharSet = $this->CharSet;
+ //Can we do a 7-bit downgrade?
if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) {
$bodyEncoding = '7bit';
$bodyCharSet = 'us-ascii';
}
+ //If lines are too long, and we're not already using an encoding that will shorten them,
+ //change to quoted-printable transfer encoding
+ if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) {
+ $this->Encoding = 'quoted-printable';
+ $bodyEncoding = 'quoted-printable';
+ }
+
$altBodyEncoding = $this->Encoding;
$altBodyCharSet = $this->CharSet;
+ //Can we do a 7-bit downgrade?
if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) {
$altBodyEncoding = '7bit';
$altBodyCharSet = 'us-ascii';
}
+ //If lines are too long, change to quoted-printable transfer encoding
+ if (self::hasLineLongerThanMax($this->AltBody)) {
+ $altBodyEncoding = 'quoted-printable';
+ }
+ //Use this as a preamble in all multipart message types
+ $mimepre = "This is a multi-part message in MIME format." . $this->LE . $this->LE;
switch ($this->message_type) {
case 'inline':
+ $body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
$body .= $this->encodeString($this->Body, $bodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->attachAll('inline', $this->boundary[1]);
break;
case 'attach':
+ $body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
$body .= $this->encodeString($this->Body, $bodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->attachAll('attachment', $this->boundary[1]);
break;
case 'inline_attach':
+ $body .= $mimepre;
$body .= $this->textLine('--' . $this->boundary[1]);
$body .= $this->headerLine('Content-Type', 'multipart/related;');
$body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->attachAll('attachment', $this->boundary[1]);
break;
case 'alt':
+ $body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);
$body .= $this->encodeString($this->AltBody, $altBodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->endBoundary($this->boundary[1]);
break;
case 'alt_inline':
+ $body .= $mimepre;
$body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, 'text/plain', $altBodyEncoding);
$body .= $this->encodeString($this->AltBody, $altBodyEncoding);
$body .= $this->LE . $this->LE;
$body .= $this->endBoundary($this->boundary[1]);
break;
case 'alt_attach':
+ $body .= $mimepre;
$body .= $this->textLine('--' . $this->boundary[1]);
$body .= $this->headerLine('Content-Type', 'multipart/alternative;');
$body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
$body .= $this->attachAll('attachment', $this->boundary[1]);
break;
case 'alt_inline_attach':
+ $body .= $mimepre;
$body .= $this->textLine('--' . $this->boundary[1]);
$body .= $this->headerLine('Content-Type', 'multipart/alternative;');
$body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"');
} elseif ($this->sign_key_file) {
try {
if (!defined('PKCS7_TEXT')) {
- throw new phpmailerException($this->lang('signing') . ' OpenSSL extension missing.');
+ throw new phpmailerException($this->lang('extension_missing') . 'openssl');
}
// @TODO would be nice to use php://temp streams here, but need to wrap for PHP < 5.1
$file = tempnam(sys_get_temp_dir(), 'mail');
- file_put_contents($file, $body); // @TODO check this worked
+ if (false === file_put_contents($file, $body)) {
+ throw new phpmailerException($this->lang('signing') . ' Could not write temp file');
+ }
$signed = tempnam(sys_get_temp_dir(), 'signed');
- if (@openssl_pkcs7_sign(
- $file,
- $signed,
- 'file://' . realpath($this->sign_cert_file),
- array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),
- null
- )
- ) {
+ //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
+ if (empty($this->sign_extracerts_file)) {
+ $sign = @openssl_pkcs7_sign(
+ $file,
+ $signed,
+ 'file://' . realpath($this->sign_cert_file),
+ array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),
+ null
+ );
+ } else {
+ $sign = @openssl_pkcs7_sign(
+ $file,
+ $signed,
+ 'file://' . realpath($this->sign_cert_file),
+ array('file://' . realpath($this->sign_key_file), $this->sign_key_pass),
+ null,
+ PKCS7_DETACHED,
+ $this->sign_extracerts_file
+ );
+ }
+ if ($sign) {
@unlink($file);
$body = file_get_contents($signed);
@unlink($signed);
+ //The message returned by openssl contains both headers and body, so need to split them up
+ $parts = explode("\n\n", $body, 2);
+ $this->MIMEHeader .= $parts[0] . $this->LE . $this->LE;
+ $body = $parts[1];
} else {
@unlink($file);
@unlink($signed);
$cidUniq[$cid] = true;
$mime[] = sprintf('--%s%s', $boundary, $this->LE);
- $mime[] = sprintf(
- 'Content-Type: %s; name="%s"%s',
- $type,
- $this->encodeHeader($this->secureHeader($name)),
- $this->LE
- );
+ //Only include a filename property if we have one
+ if (!empty($name)) {
+ $mime[] = sprintf(
+ 'Content-Type: %s; name="%s"%s',
+ $type,
+ $this->encodeHeader($this->secureHeader($name)),
+ $this->LE
+ );
+ } else {
+ $mime[] = sprintf(
+ 'Content-Type: %s%s',
+ $type,
+ $this->LE
+ );
+ }
// RFC1341 part 5 says 7bit is assumed if not specified
if ($encoding != '7bit') {
$mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, $this->LE);
$this->LE . $this->LE
);
} else {
- $mime[] = sprintf(
- 'Content-Disposition: %s; filename=%s%s',
- $disposition,
- $encoded_name,
- $this->LE . $this->LE
- );
+ if (!empty($encoded_name)) {
+ $mime[] = sprintf(
+ 'Content-Disposition: %s; filename=%s%s',
+ $disposition,
+ $encoded_name,
+ $this->LE . $this->LE
+ );
+ } else {
+ $mime[] = sprintf(
+ 'Content-Disposition: %s%s',
+ $disposition,
+ $this->LE . $this->LE
+ );
+ }
}
} else {
$mime[] = $this->LE;
//Doesn't exist in PHP 5.4, but we don't need to check because
//get_magic_quotes_runtime always returns false in 5.4+
//so it will never get here
- ini_set('magic_quotes_runtime', 0);
+ ini_set('magic_quotes_runtime', false);
}
}
$file_buffer = file_get_contents($path);
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime($magic_quotes);
} else {
- ini_set('magic_quotes_runtime', ($magic_quotes?'1':'0'));
+ ini_set('magic_quotes_runtime', $magic_quotes);
}
}
return $file_buffer;
break;
}
- if ($matchcount == 0) { // There are no chars that need encoding
+ //There are no chars that need encoding
+ if ($matchcount == 0) {
return ($str);
}
*/
public function encodeQP($string, $line_max = 76)
{
- if (function_exists('quoted_printable_encode')) { // Use native function if it's available (>= PHP5.3)
- return $this->fixEOL(quoted_printable_encode($string));
+ // Use native function if it's available (>= PHP5.3)
+ if (function_exists('quoted_printable_encode')) {
+ return quoted_printable_encode($string);
}
// Fall back to a pure PHP implementation
$string = str_replace(
array(' ', "\r\n=2E", "\r\n", '='),
rawurlencode($string)
);
- $string = preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string);
- return $this->fixEOL($string);
+ return preg_replace('/[^\r\n]{' . ($line_max - 3) . '}[^=\r\n]{2}/', "$0=\r\n", $string);
}
/**
// If the string contains an '=', make sure it's the first thing we replace
// so as to avoid double-encoding
$eqkey = array_search('=', $matches[0]);
- if ($eqkey !== false) {
+ if (false !== $eqkey) {
unset($matches[0][$eqkey]);
array_unshift($matches[0], '=');
}
/**
* Add an embedded (inline) attachment from a file.
* This can include images, sounds, and just about any other document type.
- * These differ from 'regular' attachmants in that they are intended to be
+ * These differ from 'regular' attachments in that they are intended to be
* displayed inline with the message, not just attached for download.
* This is used in HTML messages that embed the images
* the HTML refers to using the $cid value.
$disposition = 'inline'
) {
// If a MIME type is not specified, try to work it out from the name
- if ($type == '') {
+ if ($type == '' and !empty($name)) {
$type = self::filenameToType($name);
}
$this->error_count++;
if ($this->Mailer == 'smtp' and !is_null($this->smtp)) {
$lasterror = $this->smtp->getError();
- if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) {
- $msg .= '<p>' . $this->lang('smtp_error') . $lasterror['smtp_msg'] . "</p>\n";
+ if (!empty($lasterror['error'])) {
+ $msg .= $this->lang('smtp_error') . $lasterror['error'];
+ if (!empty($lasterror['detail'])) {
+ $msg .= ' Detail: '. $lasterror['detail'];
+ }
+ if (!empty($lasterror['smtp_code'])) {
+ $msg .= ' SMTP code: ' . $lasterror['smtp_code'];
+ }
+ if (!empty($lasterror['smtp_code_ex'])) {
+ $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
+ }
}
}
$this->ErrorInfo = $msg;
$this->setLanguage('en'); // set the default language
}
- if (isset($this->language[$key])) {
+ if (array_key_exists($key, $this->language)) {
+ if ($key == 'smtp_connect_failed') {
+ //Include a link to troubleshooting docs on SMTP connection failure
+ //this is by far the biggest cause of support questions
+ //but it's usually not PHPMailer's fault.
+ return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
+ }
return $this->language[$key];
} else {
- return 'Language string failed to load: ' . $key;
+ //Return the key as a fallback
+ return $key;
}
}
}
}
+ /**
+ * Returns all custom headers
+ *
+ * @return array
+ */
+ public function getCustomHeaders()
+ {
+ return $this->CustomHeader;
+ }
+
/**
* Create a message from an HTML string.
* Automatically makes modifications for inline images and backgrounds
* @access public
* @param string $message HTML message string
* @param string $basedir baseline directory for path
- * @param boolean $advanced Whether to use the advanced HTML to text converter
+ * @param boolean|callable $advanced Whether to use the internal HTML to text converter
+ * or your own custom converter @see html2text()
* @return string $message
*/
public function msgHTML($message, $basedir = '', $advanced = false)
$data = rawurldecode($data);
}
$cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2
- if ($this->addStringEmbeddedImage($data, $cid, '', 'base64', $match[1])) {
- $message = preg_replace(
- '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui',
+ if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) {
+ $message = str_replace(
+ $images[0][$imgindex],
$images[1][$imgindex] . '="cid:' . $cid . '"',
$message
);
}
- } elseif (!preg_match('#^[A-z]+://#', $url)) {
+ } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) {
// Do not change urls for absolute images (thanks to corvuscorax)
+ // Do not change urls that are already inline images
$filename = basename($url);
$directory = dirname($url);
if ($directory == '.') {
$cid,
$filename,
'base64',
- self::_mime_types(self::mb_pathinfo($filename, PATHINFO_EXTENSION))
+ self::_mime_types((string)self::mb_pathinfo($filename, PATHINFO_EXTENSION))
)
) {
$message = preg_replace(
/**
* Convert an HTML string into plain text.
+ * This is used by msgHTML().
+ * Note - older versions of this function used a bundled advanced converter
+ * which was been removed for license reasons in #232
+ * Example usage:
+ * <code>
+ * // Use default conversion
+ * $plain = $mail->html2text($html);
+ * // Use your own custom converter
+ * $plain = $mail->html2text($html, function($html) {
+ * $converter = new MyHtml2text($html);
+ * return $converter->get_text();
+ * });
+ * </code>
* @param string $html The HTML text to convert
- * @param boolean $advanced Should this use the more complex html2text converter or just a simple one?
+ * @param boolean|callable $advanced Any boolean value to use the internal converter,
+ * or provide your own callable for custom conversion.
* @return string
*/
public function html2text($html, $advanced = false)
{
- if ($advanced) {
- require_once 'extras/class.html2text.php';
- $htmlconverter = new html2text($html);
- return $htmlconverter->get_text();
+ if (is_callable($advanced)) {
+ return call_user_func($advanced, $html);
}
return html_entity_decode(
trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))),
public static function _mime_types($ext = '')
{
$mimes = array(
- 'xl' => 'application/excel',
- 'hqx' => 'application/mac-binhex40',
- 'cpt' => 'application/mac-compactpro',
- 'bin' => 'application/macbinary',
- 'doc' => 'application/msword',
- 'word' => 'application/msword',
+ 'xl' => 'application/excel',
+ 'js' => 'application/javascript',
+ 'hqx' => 'application/mac-binhex40',
+ 'cpt' => 'application/mac-compactpro',
+ 'bin' => 'application/macbinary',
+ 'doc' => 'application/msword',
+ 'word' => 'application/msword',
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
+ 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
+ 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
+ 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
+ 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'class' => 'application/octet-stream',
- 'dll' => 'application/octet-stream',
- 'dms' => 'application/octet-stream',
- 'exe' => 'application/octet-stream',
- 'lha' => 'application/octet-stream',
- 'lzh' => 'application/octet-stream',
- 'psd' => 'application/octet-stream',
- 'sea' => 'application/octet-stream',
- 'so' => 'application/octet-stream',
- 'oda' => 'application/oda',
- 'pdf' => 'application/pdf',
- 'ai' => 'application/postscript',
- 'eps' => 'application/postscript',
- 'ps' => 'application/postscript',
- 'smi' => 'application/smil',
- 'smil' => 'application/smil',
- 'mif' => 'application/vnd.mif',
- 'xls' => 'application/vnd.ms-excel',
- 'ppt' => 'application/vnd.ms-powerpoint',
+ 'dll' => 'application/octet-stream',
+ 'dms' => 'application/octet-stream',
+ 'exe' => 'application/octet-stream',
+ 'lha' => 'application/octet-stream',
+ 'lzh' => 'application/octet-stream',
+ 'psd' => 'application/octet-stream',
+ 'sea' => 'application/octet-stream',
+ 'so' => 'application/octet-stream',
+ 'oda' => 'application/oda',
+ 'pdf' => 'application/pdf',
+ 'ai' => 'application/postscript',
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+ 'smi' => 'application/smil',
+ 'smil' => 'application/smil',
+ 'mif' => 'application/vnd.mif',
+ 'xls' => 'application/vnd.ms-excel',
+ 'ppt' => 'application/vnd.ms-powerpoint',
'wbxml' => 'application/vnd.wap.wbxml',
- 'wmlc' => 'application/vnd.wap.wmlc',
- 'dcr' => 'application/x-director',
- 'dir' => 'application/x-director',
- 'dxr' => 'application/x-director',
- 'dvi' => 'application/x-dvi',
- 'gtar' => 'application/x-gtar',
- 'php3' => 'application/x-httpd-php',
- 'php4' => 'application/x-httpd-php',
- 'php' => 'application/x-httpd-php',
+ 'wmlc' => 'application/vnd.wap.wmlc',
+ 'dcr' => 'application/x-director',
+ 'dir' => 'application/x-director',
+ 'dxr' => 'application/x-director',
+ 'dvi' => 'application/x-dvi',
+ 'gtar' => 'application/x-gtar',
+ 'php3' => 'application/x-httpd-php',
+ 'php4' => 'application/x-httpd-php',
+ 'php' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
- 'phps' => 'application/x-httpd-php-source',
- 'js' => 'application/x-javascript',
- 'swf' => 'application/x-shockwave-flash',
- 'sit' => 'application/x-stuffit',
- 'tar' => 'application/x-tar',
- 'tgz' => 'application/x-tar',
- 'xht' => 'application/xhtml+xml',
+ 'phps' => 'application/x-httpd-php-source',
+ 'swf' => 'application/x-shockwave-flash',
+ 'sit' => 'application/x-stuffit',
+ 'tar' => 'application/x-tar',
+ 'tgz' => 'application/x-tar',
+ 'xht' => 'application/xhtml+xml',
'xhtml' => 'application/xhtml+xml',
- 'zip' => 'application/zip',
- 'mid' => 'audio/midi',
- 'midi' => 'audio/midi',
- 'mp2' => 'audio/mpeg',
- 'mp3' => 'audio/mpeg',
- 'mpga' => 'audio/mpeg',
- 'aif' => 'audio/x-aiff',
- 'aifc' => 'audio/x-aiff',
- 'aiff' => 'audio/x-aiff',
- 'ram' => 'audio/x-pn-realaudio',
- 'rm' => 'audio/x-pn-realaudio',
- 'rpm' => 'audio/x-pn-realaudio-plugin',
- 'ra' => 'audio/x-realaudio',
- 'wav' => 'audio/x-wav',
- 'bmp' => 'image/bmp',
- 'gif' => 'image/gif',
- 'jpeg' => 'image/jpeg',
- 'jpe' => 'image/jpeg',
- 'jpg' => 'image/jpeg',
- 'png' => 'image/png',
- 'tiff' => 'image/tiff',
- 'tif' => 'image/tiff',
- 'eml' => 'message/rfc822',
- 'css' => 'text/css',
- 'html' => 'text/html',
- 'htm' => 'text/html',
+ 'zip' => 'application/zip',
+ 'mid' => 'audio/midi',
+ 'midi' => 'audio/midi',
+ 'mp2' => 'audio/mpeg',
+ 'mp3' => 'audio/mpeg',
+ 'mpga' => 'audio/mpeg',
+ 'aif' => 'audio/x-aiff',
+ 'aifc' => 'audio/x-aiff',
+ 'aiff' => 'audio/x-aiff',
+ 'ram' => 'audio/x-pn-realaudio',
+ 'rm' => 'audio/x-pn-realaudio',
+ 'rpm' => 'audio/x-pn-realaudio-plugin',
+ 'ra' => 'audio/x-realaudio',
+ 'wav' => 'audio/x-wav',
+ 'bmp' => 'image/bmp',
+ 'gif' => 'image/gif',
+ 'jpeg' => 'image/jpeg',
+ 'jpe' => 'image/jpeg',
+ 'jpg' => 'image/jpeg',
+ 'png' => 'image/png',
+ 'tiff' => 'image/tiff',
+ 'tif' => 'image/tiff',
+ 'eml' => 'message/rfc822',
+ 'css' => 'text/css',
+ 'html' => 'text/html',
+ 'htm' => 'text/html',
'shtml' => 'text/html',
- 'log' => 'text/plain',
- 'text' => 'text/plain',
- 'txt' => 'text/plain',
- 'rtx' => 'text/richtext',
- 'rtf' => 'text/rtf',
- 'vcf' => 'text/vcard',
+ 'log' => 'text/plain',
+ 'text' => 'text/plain',
+ 'txt' => 'text/plain',
+ 'rtx' => 'text/richtext',
+ 'rtf' => 'text/rtf',
+ 'vcf' => 'text/vcard',
'vcard' => 'text/vcard',
- 'xml' => 'text/xml',
- 'xsl' => 'text/xml',
- 'mpeg' => 'video/mpeg',
- 'mpe' => 'video/mpeg',
- 'mpg' => 'video/mpeg',
- 'mov' => 'video/quicktime',
- 'qt' => 'video/quicktime',
- 'rv' => 'video/vnd.rn-realvideo',
- 'avi' => 'video/x-msvideo',
+ 'xml' => 'text/xml',
+ 'xsl' => 'text/xml',
+ 'mpeg' => 'video/mpeg',
+ 'mpe' => 'video/mpeg',
+ 'mpg' => 'video/mpeg',
+ 'mov' => 'video/quicktime',
+ 'qt' => 'video/quicktime',
+ 'rv' => 'video/vnd.rn-realvideo',
+ 'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie'
);
- return (array_key_exists(strtolower($ext), $mimes) ? $mimes[strtolower($ext)]: 'application/octet-stream');
+ if (array_key_exists(strtolower($ext), $mimes)) {
+ return $mimes[strtolower($ext)];
+ }
+ return 'application/octet-stream';
}
/**
{
// In case the path is a URL, strip any query string before getting extension
$qpos = strpos($filename, '?');
- if ($qpos !== false) {
+ if (false !== $qpos) {
$filename = substr($filename, 0, $qpos);
}
$pathinfo = self::mb_pathinfo($filename);
/**
* Set or reset instance properties.
- *
+ * You should avoid this function - it's more verbose, less efficient, more error-prone and
+ * harder to debug than setting properties directly.
* Usage Example:
- * $page->set('X-Priority', '3');
- *
+ * `$mail->set('SMTPSecure', 'tls');`
+ * is the same as:
+ * `$mail->SMTPSecure = 'tls';`
* @access public
- * @param string $name
- * @param mixed $value
- * NOTE: will not work with arrays, there are no arrays to set/reset
- * @throws phpmailerException
+ * @param string $name The property name to set
+ * @param mixed $value The value to set the property to
* @return boolean
- * @TODO Should this not be using __set() magic function?
+ * @TODO Should this not be using the __set() magic function?
*/
public function set($name, $value = '')
{
- try {
- if (isset($this->$name)) {
- $this->$name = $value;
- } else {
- throw new phpmailerException($this->lang('variable_set') . $name, self::STOP_CRITICAL);
- }
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- if ($exc->getCode() == self::STOP_CRITICAL) {
- return false;
- }
+ if (property_exists($this, $name)) {
+ $this->$name = $value;
+ return true;
+ } else {
+ $this->setError($this->lang('variable_set') . $name);
+ return false;
}
- return true;
}
/**
* @param string $cert_filename
* @param string $key_filename
* @param string $key_pass Password for private key
+ * @param string $extracerts_filename Optional path to chain certificate
*/
- public function sign($cert_filename, $key_filename, $key_pass)
+ public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')
{
$this->sign_cert_file = $cert_filename;
$this->sign_key_file = $key_filename;
$this->sign_key_pass = $key_pass;
+ $this->sign_extracerts_file = $extracerts_filename;
}
/**
{
if (!defined('PKCS7_TEXT')) {
if ($this->exceptions) {
- throw new phpmailerException($this->lang('signing') . ' OpenSSL extension missing.');
+ throw new phpmailerException($this->lang('extension_missing') . 'openssl');
}
return '';
}
$to_header = $header;
$current = 'to_header';
} else {
- if ($current && strpos($header, ' =?') === 0) {
- $current .= $header;
+ if (!empty($$current) && strpos($header, ' =?') === 0) {
+ $$current .= $header;
} else {
$current = '';
}
$body = $this->DKIM_BodyC($body);
$DKIMlen = strlen($body); // Length of body
$DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1 hash of body
- $ident = ($this->DKIM_identity == '') ? '' : ' i=' . $this->DKIM_identity . ';';
+ if ('' == $this->DKIM_identity) {
+ $ident = '';
+ } else {
+ $ident = ' i=' . $this->DKIM_identity . ';';
+ }
$dkimhdrs = 'DKIM-Signature: v=1; a=' .
$DKIMsignatureType . '; q=' .
$DKIMquery . '; l=' .
return $dkimhdrs . $signed . "\r\n";
}
+ /**
+ * Detect if a string contains a line longer than the maximum line length allowed.
+ * @param string $str
+ * @return boolean
+ * @static
+ */
+ public static function hasLineLongerThanMax($str)
+ {
+ //+2 to include CRLF line break for a 1000 total
+ return (boolean)preg_match('/^(.{'.(self::MAX_LINE_LENGTH + 2).',})/m', $str);
+ }
+
/**
* Allows for public read access to 'to' property.
* @access public
* PHPMailer RFC821 SMTP email transport class.
* Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server.
* @package PHPMailer
- * @author Chris Ryan <unknown@example.com>
+ * @author Chris Ryan
* @author Marcus Bointon <phpmailer@synchromedia.co.uk>
*/
class SMTP
* The PHPMailer SMTP version number.
* @type string
*/
- const VERSION = '5.2.9';
+ const VERSION = '5.2.13';
/**
* SMTP line break constant.
* @deprecated Use the `VERSION` constant instead
* @see SMTP::VERSION
*/
- public $Version = '5.2.9';
+ public $Version = '5.2.13';
/**
* SMTP server port number.
public $Timeout = 300;
/**
- * The SMTP timelimit value for reads, in seconds.
+ * How long to wait for commands to complete, in seconds.
+ * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2
* @type integer
*/
- public $Timelimit = 30;
+ public $Timelimit = 300;
/**
* The socket for the server connection.
protected $smtp_conn;
/**
- * Error message, if any, for the last call.
+ * Error information, if any, for the last SMTP command.
* @type array
*/
- protected $error = array();
+ protected $error = array(
+ 'error' => '',
+ 'detail' => '',
+ 'smtp_code' => '',
+ 'smtp_code_ex' => ''
+ );
/**
* The reply the server sent to us for HELO.
*/
protected $helo_rply = null;
+ /**
+ * The set of SMTP extensions sent in reply to EHLO command.
+ * Indexes of the array are extension names.
+ * Value at index 'HELO' or 'EHLO' (according to command that was sent)
+ * represents the server name. In case of HELO it is the only element of the array.
+ * Other values can be boolean TRUE or an array containing extension options.
+ * If null, no HELO/EHLO string has yet been received.
+ * @type array|null
+ */
+ protected $server_caps = null;
+
/**
* The most recent reply received from the server.
* @type string
if ($level > $this->do_debug) {
return;
}
- if (is_callable($this->Debugoutput)) {
+ //Avoid clash with built-in function names
+ if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) {
call_user_func($this->Debugoutput, $str, $this->do_debug);
return;
}
$streamok = function_exists('stream_socket_client');
}
// Clear errors to avoid confusion
- $this->error = array();
+ $this->setError('');
// Make sure we are __not__ connected
if ($this->connected()) {
// Already connected, generate error
- $this->error = array('error' => 'Already connected to a server');
+ $this->setError('Already connected to a server');
return false;
}
if (empty($port)) {
}
// Connect to the SMTP server
$this->edebug(
- "Connection: opening to $host:$port, t=$timeout, opt=".var_export($options, true),
+ "Connection: opening to $host:$port, timeout=$timeout, options=".var_export($options, true),
self::DEBUG_CONNECTION
);
$errno = 0;
}
// Verify we connected properly
if (!is_resource($this->smtp_conn)) {
- $this->error = array(
- 'error' => 'Failed to connect to server',
- 'errno' => $errno,
- 'errstr' => $errstr
+ $this->setError(
+ 'Failed to connect to server',
+ $errno,
+ $errstr
);
$this->edebug(
'SMTP ERROR: ' . $this->error['error']
// Windows does not have support for this timeout function
if (substr(PHP_OS, 0, 3) != 'WIN') {
$max = ini_get('max_execution_time');
- if ($max != 0 && $timeout > $max) { // Don't bother if unlimited
+ // Don't bother if unlimited
+ if ($max != 0 && $timeout > $max) {
@set_time_limit($timeout);
}
stream_set_timeout($this->smtp_conn, $timeout, 0);
* Perform SMTP authentication.
* Must be run after hello().
* @see hello()
- * @param string $username The user name
- * @param string $password The password
- * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5)
- * @param string $realm The auth realm for NTLM
+ * @param string $username The user name
+ * @param string $password The password
+ * @param string $authtype The auth type (PLAIN, LOGIN, NTLM, CRAM-MD5, XOAUTH2)
+ * @param string $realm The auth realm for NTLM
* @param string $workstation The auth workstation for NTLM
- * @access public
- * @return boolean True if successfully authenticated.
+ * @param null|OAuth $OAuth An optional OAuth instance (@see PHPMailerOAuth)
+ * @return bool True if successfully authenticated.* @access public
*/
public function authenticate(
$username,
$password,
- $authtype = 'LOGIN',
+ $authtype = null,
$realm = '',
- $workstation = ''
+ $workstation = '',
+ $OAuth = null
) {
- if (empty($authtype)) {
+ if (!$this->server_caps) {
+ $this->setError('Authentication is not allowed before HELO/EHLO');
+ return false;
+ }
+
+ if (array_key_exists('EHLO', $this->server_caps)) {
+ // SMTP extensions are available. Let's try to find a proper authentication method
+
+ if (!array_key_exists('AUTH', $this->server_caps)) {
+ $this->setError('Authentication is not allowed at this stage');
+ // 'at this stage' means that auth may be allowed after the stage changes
+ // e.g. after STARTTLS
+ return false;
+ }
+
+ self::edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNKNOWN'), self::DEBUG_LOWLEVEL);
+ self::edebug(
+ 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']),
+ self::DEBUG_LOWLEVEL
+ );
+
+ if (empty($authtype)) {
+ foreach (array('LOGIN', 'CRAM-MD5', 'NTLM', 'PLAIN', 'XOAUTH2') as $method) {
+ if (in_array($method, $this->server_caps['AUTH'])) {
+ $authtype = $method;
+ break;
+ }
+ }
+ if (empty($authtype)) {
+ $this->setError('No supported authentication methods found');
+ return false;
+ }
+ self::edebug('Auth method selected: '.$authtype, self::DEBUG_LOWLEVEL);
+ }
+
+ if (!in_array($authtype, $this->server_caps['AUTH'])) {
+ $this->setError("The requested authentication method \"$authtype\" is not supported by the server");
+ return false;
+ }
+ } elseif (empty($authtype)) {
$authtype = 'LOGIN';
}
switch ($authtype) {
return false;
}
break;
+ case 'XOAUTH2':
+ //If the OAuth Instance is not set. Can be a case when PHPMailer is used
+ //instead of PHPMailerOAuth
+ if (is_null($OAuth)) {
+ return false;
+ }
+ $oauth = $OAuth->getOauth64();
+
+ // Start authentication
+ if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
+ return false;
+ }
+ break;
case 'NTLM':
/*
* ntlm_sasl_client.php
* PROTOCOL Docs http://curl.haxx.se/rfc/ntlm.html#ntlmSmtpAuthentication
*/
require_once 'extras/ntlm_sasl_client.php';
- $temp = new stdClass();
+ $temp = new stdClass;
$ntlm_client = new ntlm_sasl_client_class;
//Check that functions are available
if (!$ntlm_client->Initialize($temp)) {
- $this->error = array('error' => $temp->error);
+ $this->setError($temp->error);
$this->edebug(
'You need to enable some modules in your php.ini file: '
. $this->error['error'],
// send encoded credentials
return $this->sendCommand('Username', base64_encode($response), 235);
+ default:
+ $this->setError("Authentication method \"$authtype\" is not supported");
+ return false;
}
return true;
}
*/
public function close()
{
- $this->error = array();
+ $this->setError('');
+ $this->server_caps = null;
$this->helo_rply = null;
if (is_resource($this->smtp_conn)) {
// close the connection and cleanup
*/
public function data($msg_data)
{
+ //This will use the standard timelimit
if (!$this->sendCommand('DATA', 'DATA', 354)) {
return false;
}
+
/* The server is ready to accept data!
* According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF)
* so we will break the data up into lines by \r and/or \n then if needed we will break each of those into
if ($in_headers and $line == '') {
$in_headers = false;
}
- // ok we need to break this line up into several smaller lines
- //This is a small micro-optimisation: isset($str[$len]) is equivalent to (strlen($str) > $len)
+ //Break this line up into several smaller lines if it's too long
+ //Micro-optimisation: isset($str[$len]) is faster than (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
+ //Deliberately matches both false and 0
+ if (!$pos) {
//No nice break found, add a hard break
$pos = self::MAX_LINE_LENGTH - 1;
$lines_out[] = substr($line, 0, $pos);
//Move along by the amount we dealt with
$line = substr($line, $pos + 1);
}
- /* If processing headers add a LWSP-char to the front of new line
- * RFC822 section 3.1.1
- */
+ //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1
if ($in_headers) {
$line = "\t" . $line;
}
}
$lines_out[] = $line;
- // Send the lines to the server
+ //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] == '.') {
}
}
- // Message data has been sent, complete the command
- return $this->sendCommand('DATA END', '.', 250);
+ //Message data has been sent, complete the command
+ //Increase timelimit for end of DATA command
+ $savetimelimit = $this->Timelimit;
+ $this->Timelimit = $this->Timelimit * 2;
+ $result = $this->sendCommand('DATA END', '.', 250);
+ //Restore timelimit
+ $this->Timelimit = $savetimelimit;
+ return $result;
}
/**
*/
public function hello($host = '')
{
- // Try extended hello first (RFC 2821)
+ //Try extended hello first (RFC 2821)
return (boolean)($this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host));
}
{
$noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250);
$this->helo_rply = $this->last_reply;
+ if ($noerror) {
+ $this->parseHelloFields($hello);
+ } else {
+ $this->server_caps = null;
+ }
return $noerror;
}
+ /**
+ * Parse a reply to HELO/EHLO command to discover server extensions.
+ * In case of HELO, the only parameter that can be discovered is a server name.
+ * @access protected
+ * @param string $type - 'HELO' or 'EHLO'
+ */
+ protected function parseHelloFields($type)
+ {
+ $this->server_caps = array();
+ $lines = explode("\n", $this->last_reply);
+
+ foreach ($lines as $n => $s) {
+ //First 4 chars contain response code followed by - or space
+ $s = trim(substr($s, 4));
+ if (empty($s)) {
+ continue;
+ }
+ $fields = explode(' ', $s);
+ if (!empty($fields)) {
+ if (!$n) {
+ $name = $type;
+ $fields = $fields[0];
+ } else {
+ $name = array_shift($fields);
+ switch ($name) {
+ case 'SIZE':
+ $fields = ($fields ? $fields[0] : 0);
+ break;
+ case 'AUTH':
+ if (!is_array($fields)) {
+ $fields = array();
+ }
+ break;
+ default:
+ $fields = true;
+ }
+ }
+ $this->server_caps[$name] = $fields;
+ }
+ }
+ }
+
/**
* Send an SMTP MAIL command.
* Starts a mail transaction from the email address specified in
protected function sendCommand($command, $commandstring, $expect)
{
if (!$this->connected()) {
- $this->error = array(
- 'error' => "Called $command without being connected"
- );
+ $this->setError("Called $command without being connected");
return false;
}
$this->client_send($commandstring . self::CRLF);
$this->last_reply = $this->get_lines();
- $code = substr($this->last_reply, 0, 3);
+ // Fetch SMTP code and possible error code explanation
+ $matches = array();
+ if (preg_match("/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/", $this->last_reply, $matches)) {
+ $code = $matches[1];
+ $code_ex = (count($matches) > 2 ? $matches[2] : null);
+ // Cut off error code from each response line
+ $detail = preg_replace(
+ "/{$code}[ -]".($code_ex ? str_replace('.', '\\.', $code_ex).' ' : '')."/m",
+ '',
+ $this->last_reply
+ );
+ } else {
+ // Fall back to simple parsing if regex fails
+ $code = substr($this->last_reply, 0, 3);
+ $code_ex = null;
+ $detail = substr($this->last_reply, 4);
+ }
$this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER);
if (!in_array($code, (array)$expect)) {
- $this->error = array(
- 'error' => "$command command failed",
- 'smtp_code' => $code,
- 'detail' => substr($this->last_reply, 4)
+ $this->setError(
+ "$command command failed",
+ $detail,
+ $code,
+ $code_ex
);
$this->edebug(
'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply,
return false;
}
- $this->error = array();
+ $this->setError('');
return true;
}
*/
public function turn()
{
- $this->error = array(
- 'error' => 'The SMTP TURN command is not implemented'
- );
+ $this->setError('The SMTP TURN command is not implemented');
$this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT);
return false;
}
return $this->error;
}
+ /**
+ * Get SMTP extensions available on the server
+ * @access public
+ * @return array|null
+ */
+ public function getServerExtList()
+ {
+ return $this->server_caps;
+ }
+
+ /**
+ * A multipurpose method
+ * The method works in three ways, dependent on argument value and current state
+ * 1. HELO/EHLO was not sent - returns null and set up $this->error
+ * 2. HELO was sent
+ * $name = 'HELO': returns server name
+ * $name = 'EHLO': returns boolean false
+ * $name = any string: returns null and set up $this->error
+ * 3. EHLO was sent
+ * $name = 'HELO'|'EHLO': returns server name
+ * $name = any string: if extension $name exists, returns boolean True
+ * or its options. Otherwise returns boolean False
+ * In other words, one can use this method to detect 3 conditions:
+ * - null returned: handshake was not or we don't know about ext (refer to $this->error)
+ * - false returned: the requested feature exactly not exists
+ * - positive value returned: the requested feature exists
+ * @param string $name Name of SMTP extension or 'HELO'|'EHLO'
+ * @return mixed
+ */
+ public function getServerExt($name)
+ {
+ if (!$this->server_caps) {
+ $this->setError('No HELO/EHLO was sent');
+ return null;
+ }
+
+ // the tight logic knot ;)
+ if (!array_key_exists($name, $this->server_caps)) {
+ if ($name == 'HELO') {
+ return $this->server_caps['EHLO'];
+ }
+ if ($name == 'EHLO' || array_key_exists('EHLO', $this->server_caps)) {
+ return false;
+ }
+ $this->setError('HELO handshake was used. Client knows nothing about server extensions');
+ return null;
+ }
+
+ return $this->server_caps[$name];
+ }
+
/**
* Get the last reply from the server.
* @access public
}
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
$str = @fgets($this->smtp_conn, 515);
- $this->edebug("SMTP -> get_lines(): \$data was \"$data\"", self::DEBUG_LOWLEVEL);
- $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
- $data .= $str;
$this->edebug("SMTP -> get_lines(): \$data is \"$data\"", self::DEBUG_LOWLEVEL);
+ $this->edebug("SMTP -> get_lines(): \$str is \"$str\"", self::DEBUG_LOWLEVEL);
+ $data .= $str;
// 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;
return $this->do_verp;
}
+ /**
+ * Set error messages and codes.
+ * @param string $message The error message
+ * @param string $detail Further detail on the error
+ * @param string $smtp_code An associated SMTP error code
+ * @param string $smtp_code_ex Extended SMTP code
+ */
+ protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '')
+ {
+ $this->error = array(
+ 'error' => $message,
+ 'detail' => $detail,
+ 'smtp_code' => $smtp_code,
+ 'smtp_code_ex' => $smtp_code_ex
+ );
+ }
+
/**
* Set debug output method.
- * @param string $method The function/method to use for debugging output.
+ * @param string|callable $method The name of the mechanism to use for debugging output, or a callable to handle it.
*/
public function setDebugOutput($method = 'echo')
{
--- /dev/null
+<?php
+/**
+ * Armenian PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Hrayr Grigoryan <hrayr@bits.am>
+ */
+
+$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'] = 'Հասցեն սխալ է: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.';
+$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: ';
+$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: ';
+$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: ';
+$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Azerbaijani PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author @mirjalal
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'SMTP xətası: Giriş uğursuz oldu.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP xətası: SMTP serverinə qoşulma uğursuz oldu.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP xətası: Verilənlər qəbul edilməyib.';
+$PHPMAILER_LANG['empty_message'] = 'Boş mesaj göndərilə bilməz.';
+$PHPMAILER_LANG['encoding'] = 'Qeyri-müəyyən kodlaşdırma: ';
+$PHPMAILER_LANG['execute'] = 'Əmr yerinə yetirilmədi: ';
+$PHPMAILER_LANG['file_access'] = 'Fayla giriş yoxdur: ';
+$PHPMAILER_LANG['file_open'] = 'Fayl xətası: Fayl açıla bilmədi: ';
+$PHPMAILER_LANG['from_failed'] = 'Göstərilən poçtlara göndərmə uğursuz oldu: ';
+$PHPMAILER_LANG['instantiate'] = 'Mail funksiyası işə salına bilmədi.';
+$PHPMAILER_LANG['invalid_address'] = 'Düzgün olmayan e-mail adresi: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' - e-mail kitabxanası dəstəklənmir.';
+$PHPMAILER_LANG['provide_address'] = 'Ən azı bir e-mail adresi daxil edilməlidir.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP xətası: Aşağıdakı ünvanlar üzrə alıcılara göndərmə uğursuzdur: ';
+$PHPMAILER_LANG['signing'] = 'İmzalama xətası: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP serverinə qoşulma uğursuz oldu.';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri xətası: ';
+$PHPMAILER_LANG['variable_set'] = 'Dəyişənin quraşdırılması uğursuz oldu: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Bulgarian PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Mikhail Kyosev <mialygk@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'] = 'Следните адреси за подател са невалидни: ';
+$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.';
+$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес';
+$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';
+$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: ';
+$PHPMAILER_LANG['signing'] = 'Грешка при подписване: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: ';
+$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: ';
+$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou resetar a variável: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @author LiuXin <http://www.80x86.cn/blog/>
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
+$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
+$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = '未知编码:';
-$PHPMAILER_LANG['execute'] = '不能执行: ';
-$PHPMAILER_LANG['file_access'] = '不能访问文件:';
-$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
-$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
-$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
-//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
+$PHPMAILER_LANG['encoding'] = '未知编码:';
+$PHPMAILER_LANG['execute'] = '不能执行: ';
+$PHPMAILER_LANG['file_access'] = '不能访问文件:';
+$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
+$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
+$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
+//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
-$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
+$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() selhal.';
$PHPMAILER_LANG['smtp_error'] = 'Chyba SMTP serveru: ';
$PHPMAILER_LANG['variable_set'] = 'Nelze nastavit nebo změnit proměnnou: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'Datei Fehler: konnte folgende Datei nicht öffnen: ';
$PHPMAILER_LANG['from_failed'] = 'Die folgende Absenderadresse ist nicht korrekt: ';
$PHPMAILER_LANG['instantiate'] = 'Mail Funktion konnte nicht initialisiert werden.';
-$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.';
+$PHPMAILER_LANG['invalid_address'] = 'E-Mail wird nicht gesendet, die Adresse ist ungültig.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wird nicht unterstützt.';
$PHPMAILER_LANG['provide_address'] = 'Bitte geben Sie mindestens eine Empfänger E-Mailadresse an.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Fehler: Die folgenden Empfänger sind nicht korrekt: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Verbindung zu SMTP Server fehlgeschlagen.';
$PHPMAILER_LANG['smtp_error'] = 'Fehler vom SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'Kann Variable nicht setzen oder zurücksetzen: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['encoding'] = 'Αγνωστο Encoding-Format: ';
$PHPMAILER_LANG['execute'] = 'Αδυναμία εκτέλεσης ακόλουθης εντολής: ';
$PHPMAILER_LANG['file_access'] = 'Αδυναμία προσπέλασης του αρχείου: ';
-$PHPMAILER_LANG['file_open'] = 'ΣÏ\86άλμα Î\91Ï\81Ï\87είοÏ\85: Î\94εν είναί δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
+$PHPMAILER_LANG['file_open'] = 'ΣÏ\86άλμα Î\91Ï\81Ï\87είοÏ\85: Î\94εν είναι δυνατό το άνοιγμα του ακόλουθου αρχείου: ';
$PHPMAILER_LANG['from_failed'] = 'Η παρακάτω διεύθυνση αποστολέα δεν είναι σωστή: ';
$PHPMAILER_LANG['instantiate'] = 'Αδυναμία εκκίνησης Mail function.';
-$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν αποστέλθηκε, η διεύθυνση δεν είναι έγκυρη.';
+$PHPMAILER_LANG['invalid_address'] = 'Το μήνυμα δεν εστάλη, η διεύθυνση δεν είναι έγκυρη.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer δεν υποστηρίζεται.';
$PHPMAILER_LANG['provide_address'] = 'Παρακαλούμε δώστε τουλάχιστον μια e-mail διεύθυνση παραλήπτη.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Σφάλμα: Οι παρακάτων διευθύνσεις παραλήπτη δεν είναι έγκυρες: ';
+$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'] = 'Αδυναμία ορισμού ή αρχικοποίησης μεταβλητής: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP konektado malsukcesis.';
$PHPMAILER_LANG['smtp_error'] = 'Eraro de servilo SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Variablo ne pravalorizeblas aŭ ne repravalorizeblas: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @author Matt Sturdy <matt.sturdy@gmail.com>
*/
-$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No se pudo autentificar.';
-$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No se pudo conectar al servidor SMTP.';
+$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
+$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
-$PHPMAILER_LANG['empty_message'] = 'Cuerpo del mensaje vacío';
+$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío';
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
-$PHPMAILER_LANG['execute'] = 'No se pudo ejecutar: ';
-$PHPMAILER_LANG['file_access'] = 'No se pudo acceder al archivo: ';
-$PHPMAILER_LANG['file_open'] = 'Error de Archivo: No se pudo abrir el archivo: ';
+$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
+$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
+$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
-$PHPMAILER_LANG['instantiate'] = 'No se pudo crear una instancia de la función Mail.';
-$PHPMAILER_LANG['invalid_address'] = 'No se pudo enviar: dirección de email inválido: ';
+$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
+$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
-$PHPMAILER_LANG['provide_address'] = 'Debe proveer al menos una dirección de email como destino.';
+$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() se falló.';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'No se pudo ajustar o reajustar la variable: ';
+$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
-$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
+$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: ';
$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: ';
+$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
$PHPMAILER_LANG['from_failed'] = 'Seuraava lähettäjän osoite on virheellinen: ';
$PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
-//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
+//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
-//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
+//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Échec de la connexion SMTP.';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Impossible d\'initialiser ou de réinitialiser une variable : ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['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: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$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: ';
+$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Hiba az SMTP-kapcsolatban.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-szerver hiba: ';
$PHPMAILER_LANG['variable_set'] = 'A következő változók beállítása nem sikerült: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Indonesian PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Cecep Prawiro <cecep.prawiro@gmail.com>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengautentikasi.';
+$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.';
+$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima peladen.';
+$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
+$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
+$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
+$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
+$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak bisa dibuka : ';
+$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan error : ';
+$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi email';
+$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat email tidak valid : ';
+$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
+$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer tidak didukung';
+$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan error : ';
+$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
+$PHPMAILER_LANG['smtp_error'] = 'Kesalahan peladen SMTP : ';
+$PHPMAILER_LANG['variable_set'] = 'Tidak berhasil mengatur atau mengatur ulang variable : ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
-$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
+$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @author Yoshi Sakai <http://bluemooninc.jp/>
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
-$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
+$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
+$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
-$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
-$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
-$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
-$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
-$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
-//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
-$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
+$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
+$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
+$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
+$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
+$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
+$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
+//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
+$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @author Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';
-$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: ';
-$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';
-$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: ';
-$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';
-$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: ';
-$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.';
-$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';
-$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია';
-$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';
-$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
-$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
+$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'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Korean PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author ChalkPE <amato0617@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'] = '다음 From 주소에서 오류가 발생했습니다: ';
+$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다';
+$PHPMAILER_LANG['invalid_address'] = '잘못된 주소';
+$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.';
+$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: ';
+$PHPMAILER_LANG['signing'] = '서명 오류: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: ';
+$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: ';
+$PHPMAILER_LANG['extension_missing'] = '확장자 없음: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida';
$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: ';
$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$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: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Malaysian PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Nawawi Jamili <nawawi@rutweb.com>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.';
+$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.';
+$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.';
+$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej';
+$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: ';
+$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: ';
+$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: ';
+$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: ';
+$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: ';
+$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.';
+$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah';
+$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.';
+$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.';
+$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: ';
+$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.';
+$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: ';
+$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
-$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';
+$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @package PHPMailer
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke authentisere.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP host.';
+$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Data ble ikke akseptert.';
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnholdet er tomt';
$PHPMAILER_LANG['encoding'] = 'Ukjent tegnkoding: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zakończone niepowodzeniem.';
$PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$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: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$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. ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' - почтовый сервер не поддерживается.';
$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: ';
$PHPMAILER_LANG['empty_message'] = 'Пустое тело сообщения';
-$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
+$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: ';
$PHPMAILER_LANG['signing'] = 'Ошибка подписывания: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
-//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
+//$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: ';
$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
-$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
+$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: ';
$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
--- /dev/null
+<?php
+/**
+ * Slovene PHPMailer language file: refer to English translation for definitive list
+ * @package PHPMailer
+ * @author Klemen Tušar <techouse@gmail.com>
+ */
+
+$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
+$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Ne morem vzpostaviti povezave s SMTP gostiteljem.';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.';
+$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.';
+$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: ';
+$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: ';
+$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: ';
+$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
+$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
+$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
+$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven.';
+$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
+$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
+$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
+$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: ';
+$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.';
$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Није могуће задати променљиву, нити је вратити уназад: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* Ukrainian PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
* @author Yuriy Rudyy <yrudyy@prs.net.ua>
+ * @fixed by Boris Yurchenko <boris@yurchenko.pp.ua>
*/
$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.';
-$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається підєднатися до серверу SMTP.';
+$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до серверу SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.';
$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: ';
$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: ';
$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.';
$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.';
$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
-$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправти наступним отрмувачам не вдалася: ';
+$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: ';
$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення';
-$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат email адреси: ';
+$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат адреси e-mail: ';
$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка зєднання із SMTP-сервером';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання із SMTP-сервером';
$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @author VINADES.,JSC <contact@vinades.vn>
*/
-$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.';
-$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.';
-$PHPMAILER_LANG['empty_message'] = 'Không có nội dung';
-$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: ';
-$PHPMAILER_LANG['execute'] = 'Không thực hiện được: ';
-$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin ';
-$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: ';
-$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: ';
-$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.';
-$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng';
+$PHPMAILER_LANG['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: ';
+$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: ';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
* @package PHPMailer
* @author liqwei <liqwei@liqwei.com>
* @author Peter Dave Hello <@PeterDaveHello/>
+ * @author Jason Chiang <xcojad@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['file_access'] = '無法存取檔案:';
-$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:';
-$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
-$PHPMAILER_LANG['execute'] = '無法執行:';
-$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。';
-$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: ';
-$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
+$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。';
+$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。';
+$PHPMAILER_LANG['empty_message'] = '郵件內容為空';
+$PHPMAILER_LANG['encoding'] = '未知編碼: ';
+$PHPMAILER_LANG['execute'] = '無法執行:';
+$PHPMAILER_LANG['file_access'] = '無法存取檔案:';
+$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:';
+$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
+$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。';
+$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: ';
$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:';
-$PHPMAILER_LANG['signing'] = '登入失敗: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP連線失敗';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP伺服器錯誤: ';
+$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:';
+$PHPMAILER_LANG['signing'] = '電子簽章錯誤: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗';
+$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: ';
$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: ';
+$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: ';
* @author young <masxy@foxmail.com>
*/
-$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
+$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
+$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
+$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
$PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
-$PHPMAILER_LANG['encoding'] = '未知编码: ';
-$PHPMAILER_LANG['execute'] = '无法执行:';
-$PHPMAILER_LANG['file_access'] = '无法访问文件:';
-$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
-$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
-$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
-$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。';
+$PHPMAILER_LANG['encoding'] = '未知编码: ';
+$PHPMAILER_LANG['execute'] = '无法执行:';
+$PHPMAILER_LANG['file_access'] = '无法访问文件:';
+$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
+$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
+$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
+$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。';
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
-$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
+$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
+$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
$PHPMAILER_LANG['signing'] = '登录失败:';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错: ';
$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';
+//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
<location>phpmailer</location>
<name>PHPMailer</name>
<license>LGPL</license>
- <version>5.2.9</version>
+ <version>5.2.13</version>
<licenseversion>2.1</licenseversion>
</library>
<library>