Skip to content

Commit d992ae6

Browse files
committed
Centralise check for debug output
PSR-2 reformat Enable debug output for failing test Fix broken test Comment clearout Proper thin spaces before French punctuation Fix phpdocs for addrAppend and addrFormat, fixes PHPMailer#81 Minor code cleanup, remove some local vars See changelog. More phpdoc cleanup
1 parent c5e9f78 commit d992ae6

24 files changed

+5674
-5389
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ of these things:
312312
from a designated place, offer equivalent access to copy the above
313313
specified materials from the same place.
314314

315-
e) Verify that the user has already received a copy of these
315+
e) verify that the user has already received a copy of these
316316
materials or that you have already sent this user a copy.
317317

318318
For an executable, the required form of the "work that uses the

PHPMailerAutoload.php

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* PHPMailer SPL autoloader.
4+
* PHP Version 5.0.0
5+
* @package PHPMailer
6+
* @link https://github.com/PHPMailer/PHPMailer/
7+
* @author Marcus Bointon (coolbru) <[email protected]>
8+
* @author Jim Jagielski (jimjag) <[email protected]>
9+
* @author Andy Prevost (codeworxtech) <[email protected]>
10+
* @author Brent R. Matzelle (original founder)
11+
* @copyright 2013 Marcus Bointon
12+
* @copyright 2010 - 2012 Jim Jagielski
13+
* @copyright 2004 - 2009 Andy Prevost
14+
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
15+
* @note This program is distributed in the hope that it will be useful - WITHOUT
16+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17+
* FITNESS FOR A PARTICULAR PURPOSE.
18+
*/
19+
20+
/**
21+
* PHPMailer SPL autoloader.
22+
* @param string $classname The name of the class to load
23+
*/
24+
function PHPMailerAutoload($classname)
25+
{
26+
//Can't use __DIR__ as it's only in PHP 5.3+
27+
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
28+
if (is_readable($filename)) {
29+
require $filename;
30+
}
31+
}
32+
33+
spl_autoload_register('PHPMailerAutoload');

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](htt
77
- Probably the world's most popular code for sending email from PHP!
88
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more
99
- Integrated SMTP support - send without a local mail server
10-
- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
10+
- send emails with multiple TOs, CCs, BCCs and REPLY-TOs
1111
- Multipart/alternative emails for mail clients that do not read HTML email
1212
- Support for 8bit, base64, binary, and quoted-printable encoding
1313
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms
@@ -42,7 +42,7 @@ require 'class.phpmailer.php';
4242

4343
$mail = new PHPMailer;
4444

45-
$mail->IsSMTP(); // Set mailer to use SMTP
45+
$mail->isSMTP(); // Set mailer to use SMTP
4646
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server
4747
$mail->SMTPAuth = true; // Enable SMTP authentication
4848
$mail->Username = 'jswan'; // SMTP username
@@ -51,22 +51,22 @@ $mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl
5151

5252
$mail->From = '[email protected]';
5353
$mail->FromName = 'Mailer';
54-
$mail->AddAddress('[email protected]', 'Josh Adams'); // Add a recipient
55-
$mail->AddAddress('[email protected]'); // Name is optional
56-
$mail->AddReplyTo('[email protected]', 'Information');
57-
$mail->AddCC('[email protected]');
58-
$mail->AddBCC('[email protected]');
54+
$mail->addAddress('[email protected]', 'Josh Adams'); // Add a recipient
55+
$mail->addAddress('[email protected]'); // Name is optional
56+
$mail->addReplyTo('[email protected]', 'Information');
57+
$mail->addCC('[email protected]');
58+
$mail->addBCC('[email protected]');
5959

6060
$mail->WordWrap = 50; // Set word wrap to 50 characters
61-
$mail->AddAttachment('/var/tmp/file.tar.gz'); // Add attachments
62-
$mail->AddAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
63-
$mail->IsHTML(true); // Set email format to HTML
61+
$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
62+
$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
63+
$mail->isHTML(true); // Set email format to HTML
6464

6565
$mail->Subject = 'Here is the subject';
6666
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
6767
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
6868

69-
if(!$mail->Send()) {
69+
if(!$mail->send()) {
7070
echo 'Message could not be sent.';
7171
echo 'Mailer Error: ' . $mail->ErrorInfo;
7272
exit;
@@ -84,7 +84,7 @@ PHPMailer defaults to English, but in the `languages` folder you'll find numerou
8484

8585
```php
8686
// To load the French version
87-
$mail->SetLanguage('fr', '/optional/path/to/language/directory/');
87+
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
8888
```
8989

9090
## Documentation

changelog.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ChangeLog
22

3+
## Version 5.2.7 ()
34
* Add Ukranian translation from @Krezalis
45
* Support for do_verp
56
* Fix bug in CRAM-MD5 AUTH
@@ -14,19 +15,26 @@
1415
* Update SyntaxHighlighter
1516
* Major overhaul and cleanup of example code
1617
* New PHPMailer graphic
17-
* MsgHTML now uses RFC2392-compliant content ids
18-
* Add line break normalization function and use it in MsgHTML
18+
* msgHTML now uses RFC2392-compliant content ids
19+
* Add line break normalization function and use it in msgHTML
1920
* Don't set unnecessary reply-to addresses
2021
* Make fakesendmail.sh a bit cleaner and safer
2122
* Set a content-transfer-encoding on multiparts (fixes msglint error)
22-
* Fix cid generation in MsgHTML (Thanks to @digitalthought)
23+
* Fix cid generation in msgHTML (Thanks to @digitalthought)
2324
* Fix handling of multiple SMTP servers (Thanks to @NanoCaiordo)
24-
* SMTP->Connect() now supports stream context options (Thanks to @stanislavdavid)
25+
* SMTP->connect() now supports stream context options (Thanks to @stanislavdavid)
2526
* Add support for iCal event alternatives (Thanks to @reblutus)
2627
* Update to Polish language file (Thanks to Krzysztof Kowalewski)
2728
* Update to Norwegian language file (Thanks to @datagutten)
2829
* Update to Hungarian language file (Thanks to @dominicus-75)
2930
* Add Persian/Farsi translation from @jaii
31+
* Make SMTPDebug property type match type in SMTP class
32+
* Add unit tests for DKIM
33+
* Major refactor of SMTP class
34+
* Reformat to PSR-2 coding standard
35+
* Introduce autoloader
36+
* Allow overriding of SMTP class
37+
* Overhaul of PHPDocs
3038

3139
## Version 5.2.6 (April 11th 2013)
3240
* Reflect move to PHPMailer GitHub organisation at https://github.com/PHPMailer/PHPMailer

0 commit comments

Comments
 (0)