forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
24 changed files
with
5,674 additions
and
5,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* PHPMailer SPL autoloader. | ||
* PHP Version 5.0.0 | ||
* @package PHPMailer | ||
* @link https://github.com/PHPMailer/PHPMailer/ | ||
* @author Marcus Bointon (coolbru) <[email protected]> | ||
* @author Jim Jagielski (jimjag) <[email protected]> | ||
* @author Andy Prevost (codeworxtech) <[email protected]> | ||
* @author Brent R. Matzelle (original founder) | ||
* @copyright 2013 Marcus Bointon | ||
* @copyright 2010 - 2012 Jim Jagielski | ||
* @copyright 2004 - 2009 Andy Prevost | ||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License | ||
* @note This program is distributed in the hope that it will be useful - WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
/** | ||
* PHPMailer SPL autoloader. | ||
* @param string $classname The name of the class to load | ||
*/ | ||
function PHPMailerAutoload($classname) | ||
{ | ||
//Can't use __DIR__ as it's only in PHP 5.3+ | ||
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php'; | ||
if (is_readable($filename)) { | ||
require $filename; | ||
} | ||
} | ||
|
||
spl_autoload_register('PHPMailerAutoload'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](htt | |
- Probably the world's most popular code for sending email from PHP! | ||
- Used by many open-source projects: Drupal, SugarCRM, Yii, Joomla! and many more | ||
- Integrated SMTP support - send without a local mail server | ||
- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs | ||
- send emails with multiple TOs, CCs, BCCs and REPLY-TOs | ||
- Multipart/alternative emails for mail clients that do not read HTML email | ||
- Support for 8bit, base64, binary, and quoted-printable encoding | ||
- SMTP authentication with LOGIN, PLAIN, NTLM and CRAM-MD5 mechanisms | ||
|
@@ -42,7 +42,7 @@ require 'class.phpmailer.php'; | |
|
||
$mail = new PHPMailer; | ||
|
||
$mail->IsSMTP(); // Set mailer to use SMTP | ||
$mail->isSMTP(); // Set mailer to use SMTP | ||
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup server | ||
$mail->SMTPAuth = true; // Enable SMTP authentication | ||
$mail->Username = 'jswan'; // SMTP username | ||
|
@@ -51,22 +51,22 @@ $mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl | |
|
||
$mail->From = '[email protected]'; | ||
$mail->FromName = 'Mailer'; | ||
$mail->AddAddress('[email protected]', 'Josh Adams'); // Add a recipient | ||
$mail->AddAddress('[email protected]'); // Name is optional | ||
$mail->AddReplyTo('[email protected]', 'Information'); | ||
$mail->AddCC('[email protected]'); | ||
$mail->AddBCC('[email protected]'); | ||
$mail->addAddress('[email protected]', 'Josh Adams'); // Add a recipient | ||
$mail->addAddress('[email protected]'); // Name is optional | ||
$mail->addReplyTo('[email protected]', 'Information'); | ||
$mail->addCC('[email protected]'); | ||
$mail->addBCC('[email protected]'); | ||
|
||
$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 | ||
$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 | ||
|
||
$mail->Subject = 'Here is the subject'; | ||
$mail->Body = 'This is the HTML message body <b>in bold!</b>'; | ||
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; | ||
|
||
if(!$mail->Send()) { | ||
if(!$mail->send()) { | ||
echo 'Message could not be sent.'; | ||
echo 'Mailer Error: ' . $mail->ErrorInfo; | ||
exit; | ||
|
@@ -84,7 +84,7 @@ PHPMailer defaults to English, but in the `languages` folder you'll find numerou | |
|
||
```php | ||
// To load the French version | ||
$mail->SetLanguage('fr', '/optional/path/to/language/directory/'); | ||
$mail->setLanguage('fr', '/optional/path/to/language/directory/'); | ||
``` | ||
|
||
## Documentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.