Version 3.4.8
This commit is contained in:
1 parent
b45ea0dffb
commit
c603205a25
1398 files changed
+36675
-31023
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.4.6
|
||||
* IP.Board v3.4.8
|
||||
* Send email using php mail() or SMTP
|
||||
* Last Updated: $Date: 2012-11-12 11:43:40 -0500 (Mon, 12 Nov 2012) $
|
||||
* Last Updated: $Date: 2015-02-13 15:16:16 -0500 (Fri, 13 Feb 2015) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: rashbrook $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Kernel
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 11592 $
|
||||
* @version $Revision: 12597 $
|
||||
*
|
||||
*
|
||||
* Example usage:
|
||||
@@ -248,7 +248,7 @@ class classEmail implements interfaceEmail
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $boundry = "----=_NextPart_000_0022_01C1BD6C.D0C0F9F0";
|
||||
protected $boundry = NULL;
|
||||
|
||||
/**
|
||||
* HTML email flag
|
||||
@@ -391,6 +391,8 @@ class classEmail implements interfaceEmail
|
||||
$this->wrap_brackets = !empty($opts['wrap_brackets']) ? true : false;
|
||||
$this->extra_opts = !empty($opts['extra_opts']) ? $opts['extra_opts'] : '';
|
||||
|
||||
$this->boundry = "----" . md5( uniqid() . mt_rand( 11111, 99999 ) );
|
||||
|
||||
if ( ! defined( 'EMAIL_MULTI_HEADERS_IN_BODY' ) )
|
||||
{
|
||||
define( 'EMAIL_MULTI_HEADERS_IN_BODY', false );
|
||||
@@ -1064,6 +1066,14 @@ class classEmail implements interfaceEmail
|
||||
*/
|
||||
protected function _smtpConnect()
|
||||
{
|
||||
$tls = FALSE;
|
||||
|
||||
if ( substr( $this->smtp_host, 0, 6 ) == 'tls://' )
|
||||
{
|
||||
$tls = TRUE;
|
||||
$this->smtp_host = str_replace( 'tls://', '', $this->smtp_host );
|
||||
}
|
||||
|
||||
$this->smtp_fp = @fsockopen( $this->smtp_host, intval($this->smtp_port), $errno, $errstr, 30 );
|
||||
|
||||
if ( ! $this->smtp_fp )
|
||||
@@ -1090,6 +1100,23 @@ class classEmail implements interfaceEmail
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $tls == TRUE )
|
||||
{
|
||||
$this->_smtpSendCmd( "STARTTLS" );
|
||||
|
||||
if ( $this->smtp_code != 220 )
|
||||
{
|
||||
$this->_smtpError( "STARTTLS Failed" );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! @stream_socket_enable_crypto( $this->smtp_fp, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT ) )
|
||||
{
|
||||
$this->_smtpError( "Failed to enable crypto (TLS)" );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Do you like my user!
|
||||
//-----------------------------------------
|
||||
|
||||
Reference in new issue
Block a user