Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -16,7 +16,8 @@ use IPS\core\Advertisement;
|
||||
use IPS\core\extensions\core\CommunityEnhancements\SendGrid as SendGridIntegration;
|
||||
use IPS\Db;
|
||||
use IPS\Email;
|
||||
use IPS\Http\Request\Exception;
|
||||
use IPS\Http\Request\Exception as RequestException;
|
||||
use IPS\Email\Outgoing\Exception as EmailException;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Lang;
|
||||
use IPS\Member;
|
||||
@@ -71,7 +72,7 @@ class SendGrid extends Email
|
||||
* @param mixed $fromName The name the email should appear from. If NULL, default setting is used
|
||||
* @param array $additionalHeaders The name the email should appear from. If NULL, default setting is used
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @throws EmailException
|
||||
*/
|
||||
public function _send( mixed $to, mixed $cc=array(), mixed $bcc=array(), mixed $fromEmail = NULL, mixed $fromName = NULL, array $additionalHeaders = array() ) : void
|
||||
{
|
||||
@@ -129,7 +130,7 @@ class SendGrid extends Email
|
||||
$response = $this->_api( 'mail/send', $request );
|
||||
if ( isset( $response['errors'] ) )
|
||||
{
|
||||
throw new Exception( $response['errors'][0]['message'] );
|
||||
throw new EmailException( $response['errors'][0]['message'] );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +217,7 @@ class SendGrid extends Email
|
||||
{
|
||||
$response = $this->_api( 'mail/send', $request );
|
||||
}
|
||||
catch(Exception $e )
|
||||
catch(RequestException $e )
|
||||
{
|
||||
Db::i()->insert( 'core_mail_error_logs', array(
|
||||
'mlog_date' => time(),
|
||||
@@ -395,14 +396,13 @@ class SendGrid extends Email
|
||||
return $this->_api( 'scopes' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse/Save email form settings
|
||||
*
|
||||
* @param array $values settings array
|
||||
* @return array
|
||||
*/
|
||||
public function saveSettings( array $values ): array
|
||||
/**
|
||||
* Parse/Save email form settings
|
||||
*
|
||||
* @param array $values settings array
|
||||
* @return array
|
||||
*/
|
||||
public static function processSettings( array $values ): array
|
||||
{
|
||||
if ( isset( $values['mail_method'] ) and $values['mail_method'] != 'sendgrid' and Settings::i()->sendgrid_use_for == 2 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user