2
2
/*~ class.phpmailer.php
3
3
.---------------------------------------------------------------------------.
4
4
| Software: PHPMailer - PHP email class |
5
- | Version: 5.2.2 |
5
+ | Version: 5.2.4 |
6
6
| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ |
7
7
| ------------------------------------------------------------------------- |
8
8
| Admin: Jim Jagielski (project admininistrator) |
@@ -103,7 +103,7 @@ class PHPMailer {
103
103
*/
104
104
public $ ReturnPath = '' ;
105
105
106
- /**
106
+ /**
107
107
* Sets the Subject of the message.
108
108
* @var string
109
109
*/
@@ -390,7 +390,7 @@ class PHPMailer {
390
390
* Sets the PHPMailer Version number
391
391
* @var string
392
392
*/
393
- public $ Version = '5.2.2 ' ;
393
+ public $ Version = '5.2.4 ' ;
394
394
395
395
/**
396
396
* What to use in the X-Mailer header
@@ -554,7 +554,6 @@ public function IsHTML($ishtml = true) {
554
554
/**
555
555
* Sets Mailer to send message using SMTP.
556
556
* @return void
557
- * @deprecated
558
557
*/
559
558
public function IsSMTP () {
560
559
$ this ->Mailer = 'smtp ' ;
@@ -563,7 +562,6 @@ public function IsSMTP() {
563
562
/**
564
563
* Sets Mailer to send message using PHP mail() function.
565
564
* @return void
566
- * @deprecated
567
565
*/
568
566
public function IsMail () {
569
567
$ this ->Mailer = 'mail ' ;
@@ -572,7 +570,6 @@ public function IsMail() {
572
570
/**
573
571
* Sets Mailer to send message using the $Sendmail program.
574
572
* @return void
575
- * @deprecated
576
573
*/
577
574
public function IsSendmail () {
578
575
if (!stristr (ini_get ('sendmail_path ' ), 'sendmail ' )) {
@@ -584,7 +581,6 @@ public function IsSendmail() {
584
581
/**
585
582
* Sets Mailer to send message using the qmail MTA.
586
583
* @return void
587
- * @deprecated
588
584
*/
589
585
public function IsQmail () {
590
586
if (stristr (ini_get ('sendmail_path ' ), 'qmail ' )) {
@@ -736,7 +732,7 @@ public function SetFrom($address, $name = '', $auto = 1) {
736
732
*/
737
733
public static function ValidateAddress ($ address ) {
738
734
if (defined ('PCRE_VERSION ' )) { //Check this instead of extension_loaded so it works when that function is disabled
739
- if (PCRE_VERSION >= 8. 0 ) {
735
+ if (version_compare ( PCRE_VERSION , ' 8.0 ' ) >= 0 ) {
740
736
return (boolean )preg_match ('/^(?!(?>(?1)"?(?> \\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?> \\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)(?>[\x01-\x08\x0B\x0C\x0E- \'*-\[\]-\x7F]| \\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#- \'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]| \\\[\x00-\x7F]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD ' , $ address );
741
737
} else {
742
738
//Fall back to an older regex that doesn't need a recent PCRE
@@ -910,14 +906,14 @@ protected function SendmailSend($header, $body) {
910
906
return true ;
911
907
}
912
908
913
- /**
914
- * Sends mail using the PHP mail() function.
915
- * @param string $header The message headers
916
- * @param string $body The message body
917
- * @throws phpmailerException
918
- * @access protected
919
- * @return bool
920
- */
909
+ /**
910
+ * Sends mail using the PHP mail() function.
911
+ * @param string $header The message headers
912
+ * @param string $body The message body
913
+ * @throws phpmailerException
914
+ * @access protected
915
+ * @return bool
916
+ */
921
917
protected function MailSend ($ header , $ body ) {
922
918
$ toArr = array ();
923
919
foreach ($ this ->to as $ t ) {
@@ -2031,13 +2027,13 @@ public function Base64EncodeWrapMB($str, $lf=null) {
2031
2027
}
2032
2028
2033
2029
/**
2034
- * Encode string to RFC2045 (6.7) quoted-printable format
2035
- * @access public
2036
- * @param string $string The text to encode
2037
- * @param integer $line_max Number of chars allowed on a line before wrapping
2038
- * @return string
2039
- * @link PHP version adapted from http://www.php.net/manual/en/function.quoted-printable-decode.php#89417
2040
- */
2030
+ * Encode string to RFC2045 (6.7) quoted-printable format
2031
+ * @access public
2032
+ * @param string $string The text to encode
2033
+ * @param integer $line_max Number of chars allowed on a line before wrapping
2034
+ * @return string
2035
+ * @link PHP version adapted from http://www.php.net/manual/en/function.quoted-printable-decode.php#89417
2036
+ */
2041
2037
public function EncodeQP ($ string , $ line_max = 76 ) {
2042
2038
if (function_exists ('quoted_printable_encode ' )) { //Use native function if it's available (>= PHP5.3)
2043
2039
return quoted_printable_encode ($ string );
@@ -2048,15 +2044,15 @@ public function EncodeQP($string, $line_max = 76) {
2048
2044
return $ string ;
2049
2045
}
2050
2046
2051
- /**
2052
- * Wrapper to preserve BC for old QP encoding function that was removed
2053
- * @see EncodeQP()
2054
- * @access public
2055
- * @param string $string
2056
- * @param integer $line_max
2057
- * @param bool $space_conv
2058
- * @return string
2059
- */
2047
+ /**
2048
+ * Wrapper to preserve BC for old QP encoding function that was removed
2049
+ * @see EncodeQP()
2050
+ * @access public
2051
+ * @param string $string
2052
+ * @param integer $line_max
2053
+ * @param bool $space_conv
2054
+ * @return string
2055
+ */
2060
2056
public function EncodeQPphp ($ string , $ line_max = 76 , $ space_conv = false ) {
2061
2057
return $ this ->EncodeQP ($ string , $ line_max );
2062
2058
}
@@ -2179,12 +2175,12 @@ public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64',
2179
2175
* @param string $type MIME type.
2180
2176
* @return bool True on successfully adding an attachment
2181
2177
*/
2182
- public function AddStringEmbeddedImage ($ string , $ cid , $ filename = '' , $ encoding = 'base64 ' , $ type = 'application/octet-stream ' ) {
2178
+ public function AddStringEmbeddedImage ($ string , $ cid , $ name = '' , $ encoding = 'base64 ' , $ type = 'application/octet-stream ' ) {
2183
2179
// Append to $attachment array
2184
2180
$ this ->attachment [] = array (
2185
2181
0 => $ string ,
2186
- 1 => $ filename ,
2187
- 2 => basename ( $ filename ) ,
2182
+ 1 => $ name ,
2183
+ 2 => $ name ,
2188
2184
3 => $ encoding ,
2189
2185
4 => $ type ,
2190
2186
5 => true , // isStringAttachment
0 commit comments