Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -62,7 +62,7 @@ class _Debug extends \IPS\Email
|
||||
{
|
||||
if( !is_dir( $this->debugPath ) )
|
||||
{
|
||||
throw new \IPS\Email\Outgoing\Exception( sprintf( \IPS\Member::loggedIn()->language()->get('no_path_email_debug'), $this->debugPath ) );
|
||||
throw new \IPS\Email\Outgoing\Exception( 'no_path_email_debug', 0, NULL, array( $this->debugPath ) );
|
||||
}
|
||||
|
||||
$fullEmailContents = $this->compileFullEmail( $to, $cc, $bcc, $fromEmail, $fromName, $additionalHeaders );
|
||||
@@ -70,7 +70,7 @@ class _Debug extends \IPS\Email
|
||||
$filename = date("M-j-Y") . '-' . microtime() . '-' . urlencode( mb_substr( $this->_parseRecipients( $to, TRUE ), 0, 200 ) ) . ".eml";
|
||||
if( !@\file_put_contents( rtrim( $this->debugPath, '/' ) . '/' . $filename, $fullEmailContents ) )
|
||||
{
|
||||
throw new \IPS\Email\Outgoing\Exception( \IPS\Member::loggedIn()->language()->addToStack( 'no_write_email_debug', FALSE, array( 'sprintf' => array( rtrim( $this->debugPath, '/' ) . '/' . $filename ) ) ) );
|
||||
throw new \IPS\Email\Outgoing\Exception( 'no_write_email_debug', 0, NULL, array( rtrim( $this->debugPath, '/' ) . '/' . $filename ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,5 +22,25 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _Exception extends \RuntimeException
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Extra details for log
|
||||
*/
|
||||
public $extraDetails = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message Error message
|
||||
* @param int $code Error Code
|
||||
* @param \Exception|NULL $previous Previous Exception
|
||||
* @param array|NULL $extra Extra details for log
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $message = null, $code = 0, $previous = null, $extra=NULL )
|
||||
{
|
||||
/* Store these for the extraLogData() method */
|
||||
$this->extraDetails = $extra;
|
||||
|
||||
return parent::__construct( $message, $code, $previous );
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class _PHP extends \IPS\Email
|
||||
else
|
||||
{
|
||||
/* If $error is null, mail() is probably disabled */
|
||||
throw new \IPS\Email\Outgoing\Exception( \IPS\Member::loggedIn()->language()->addToStack( 'email_test_mailfunction_disabled', FALSE ) );
|
||||
throw new \IPS\Email\Outgoing\Exception( 'email_test_mailfunction_disabled' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class _SendGrid extends \IPS\Email
|
||||
'mlog_subject' => $subject,
|
||||
'mlog_content' => $htmlContent,
|
||||
'mlog_resend_data' => NULL,
|
||||
'mlog_msg' => json_encode( $e->getMessage() ),
|
||||
'mlog_msg' => json_encode( array( 'message' => $e->getMessage() ) ),
|
||||
'mlog_smtp_log' => NULL
|
||||
) );
|
||||
|
||||
@@ -210,7 +210,7 @@ class _SendGrid extends \IPS\Email
|
||||
'mlog_subject' => $subject,
|
||||
'mlog_content' => $htmlContent,
|
||||
'mlog_resend_data' => NULL,
|
||||
'mlog_msg' => json_encode( $response['errors'] ),
|
||||
'mlog_msg' => json_encode( array( 'message' => $response['errors'] ) ),
|
||||
'mlog_smtp_log' => NULL
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ class _SMTP extends \IPS\Email
|
||||
$responseCode = mb_substr( $announce, 0, 3 );
|
||||
if ( $responseCode != 220 )
|
||||
{
|
||||
throw new \IPS\Email\Outgoing\Exception( \IPS\Member::loggedIn()->language()->addToStack('smtpmail_fsock_error_initial', FALSE, array( 'sprintf' => array( $responseCode ) ) ) );
|
||||
throw new \IPS\Email\Outgoing\Exception( 'smtpmail_fsock_error_initial', 0, NULL, array( $responseCode ) );
|
||||
}
|
||||
|
||||
/* HELO/EHLO */
|
||||
@@ -143,7 +143,7 @@ class _SMTP extends \IPS\Email
|
||||
else
|
||||
{
|
||||
/* If it still failed on the second connection attempt, throw the exception */
|
||||
throw new \IPS\Email\Outgoing\Exception( \IPS\Member::loggedIn()->language()->addToStack('smtpmail_tls_failed') );
|
||||
throw new \IPS\Email\Outgoing\Exception( 'smtpmail_tls_failed' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user