Merge branch 'w36_MDL-35186_m24_phpmailer' of git://github.com/skodak/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2012-09-03 23:31:13 +02:00
commit ffa9378541
7 changed files with 496 additions and 261 deletions

View File

@ -1,14 +1,21 @@
/*******************************************************************
* The http://phpmailer.codeworxtech.com/ website now carries a few *
* advertisements through the Google Adsense network. Please visit *
* the advertiser sites and help us offset some of our costs. *
* Thanks .... *
* http://code.google.com/a/apache-extras.org/p/phpmailer/ *
********************************************************************/
PHPMailer
Full Featured Email Transfer Class for PHP
==========================================
Version 5.2.1 (January 16, 2012)
Patch release (see changelog.txt).
Version 5.2.0 (July 19, 2011)
With the release of this version, PHPMailer has moved to Apache
Extras:
http://code.google.com/a/apache-extras.org/p/phpmailer/
Version 5.0.0 (April 02, 2009)
With the release of this version, we are initiating a new version numbering

View File

@ -1,4 +1,4 @@
Description of PHPMailer 5.1 library import into Moodle
Description of PHPMailer 5.2.1 library import into Moodle
We now use a vanilla version of phpmailer and do our customisations in a
subclass.

View File

@ -3,6 +3,19 @@ ChangeLog
NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5/PHP6.
IT WILL NOT WORK WITH PHP4.
Version 5.2.1 (January 16, 2012)
* Closed several bugs
* Performance improvements
* MsgHTML() now returns the message as required.
* New method: GetSentMIMEMessage() (returns full copy of sent message)
Version 5.2 (July 19, 2011)
* protected MIME body and header
* better DKIM DNS Resource Record support
* better aly handling
* htmlfilter class added to extras
* moved to Apache Extras
Version 5.1 (October 20, 2009)
* fixed filename issue with AddStringAttachment (thanks to Tony)
* fixed "SingleTo" property, now works with Senmail, Qmail, and SMTP in

File diff suppressed because it is too large Load Diff

View File

@ -2,15 +2,15 @@
/*~ class.smtp.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
| Version: 5.1 |
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
| Info: http://phpmailer.sourceforge.net |
| Support: http://sourceforge.net/projects/phpmailer/ |
| Version: 5.2.1 |
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
| ------------------------------------------------------------------------- |
| Admin: Andy Prevost (project admininistrator) |
| Admin: Jim Jagielski (project admininistrator) |
| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net |
| : Jim Jagielski (jimjag) jimjag@gmail.com |
| Founder: Brent R. Matzelle (original founder) |
| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. |
| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. |
| Copyright (c) 2001-2003, Brent R. Matzelle |
| ------------------------------------------------------------------------- |
@ -19,11 +19,6 @@
| 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. |
| ------------------------------------------------------------------------- |
| We offer a number of paid services (www.codeworxtech.com): |
| - Web Hosting on highly optimized fast and secure servers |
| - Technology Consulting |
| - Oursourcing (highly qualified programmers and graphic designers) |
'---------------------------------------------------------------------------'
*/
@ -34,8 +29,10 @@
* @author Andy Prevost
* @author Marcus Bointon
* @copyright 2004 - 2008 Andy Prevost
* @author Jim Jagielski
* @copyright 2010 - 2012 Jim Jagielski
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
* @version $Id$
* @version $Id: class.smtp.php 450 2010-06-23 16:46:33Z coolbru $
*/
/**
@ -71,6 +68,12 @@ class SMTP {
*/
public $do_verp = false;
/**
* Sets the SMTP PHPMailer Version number
* @var string
*/
public $Version = '5.2.1';
/////////////////////////////////////////////////
// PROPERTIES, PRIVATE AND PROTECTED
/////////////////////////////////////////////////
@ -794,7 +797,8 @@ class SMTP {
*/
private function get_lines() {
$data = "";
while($str = @fgets($this->smtp_conn,515)) {
while(!feof($this->smtp_conn)) {
$str = @fgets($this->smtp_conn,515);
if($this->do_debug >= 4) {
echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '<br />';
echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '<br />';
@ -811,4 +815,4 @@ class SMTP {
}
?>
?>

View File

@ -1,31 +1,30 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Moodle - Modular Object-Oriented Dynamic Learning Environment
* http://moodle.org
* Copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Customised version of phpmailer for Moodle
*
* @package moodle
* @subpackage lib
* @author Dan Poltawski <talktodan@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
* Customised version of phpmailer for Moodle
*/
defined('MOODLE_INTERNAL') || die();
// PLEASE NOTE: we use the phpmailer class _unmodified_
// through the joys of OO. Distros are free to use their stock
// version of this file.
@ -73,7 +72,7 @@ class moodle_phpmailer extends PHPMailer {
* Use internal moodles own textlib to encode mimeheaders.
* Fall back to phpmailers inbuilt functions if not
*/
public function EncodeHeader ($str, $position = 'text') {
public function EncodeHeader($str, $position = 'text') {
$encoded = textlib::encode_mimeheader($str, $this->CharSet);
if ($encoded !== false) {
$encoded = str_replace("\n", $this->LE, $encoded);

View File

@ -165,7 +165,7 @@
<location>phpmailer</location>
<name>PHPMailer</name>
<license>LGPL</license>
<version>5.1</version>
<version>5.2.1</version>
<licenseversion>2.1</licenseversion>
</library>
<library>