Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief IPS CiC Email Class
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @since 13 Dec 2016
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\Email\Outgoing;
|
||||
@@ -80,19 +79,26 @@ class _IpsCic extends \IPS\Email
|
||||
*/
|
||||
public function _send( $to, $cc=array(), $bcc=array(), $fromEmail = NULL, $fromName = NULL, $additionalHeaders = array() )
|
||||
{
|
||||
\IPS\Http\Url::external( static::ENDPOINT )->request()->post( array(
|
||||
'siteId' => $this->community,
|
||||
'to' => explode( ',', static::_parseRecipients( $to, TRUE ) ),
|
||||
'cc' => explode( ',', static::_parseRecipients( $cc, TRUE ) ),
|
||||
'bcc' => explode( ',', static::_parseRecipients( $bcc, TRUE ) ),
|
||||
'fromEmail' => $fromEmail ?: \IPS\Settings::i()->email_out,
|
||||
'fromName' => $fromName ?: \IPS\Settings::i()->board_name,
|
||||
'additionalHeaders' => $additionalHeaders,
|
||||
'subject' => $this->compileSubject( static::_getMemberFromRecipients( $to ) ),
|
||||
'html' => $this->compileContent( 'html', static::_getMemberFromRecipients( $to ) ),
|
||||
'plaintext' => $this->compileContent( 'plaintext', static::_getMemberFromRecipients( $to ) ),
|
||||
'precedence' => ( $this->type === static::TYPE_LIST ) ? 'list' : ( $this->type === static::TYPE_BULK ? 'bulk' : '' )
|
||||
) );
|
||||
try
|
||||
{
|
||||
\IPS\Http\Url::external( static::ENDPOINT )->request()->post( array(
|
||||
'siteId' => $this->community,
|
||||
'to' => explode( ',', static::_parseRecipients( $to, TRUE ) ),
|
||||
'cc' => explode( ',', static::_parseRecipients( $cc, TRUE ) ),
|
||||
'bcc' => explode( ',', static::_parseRecipients( $bcc, TRUE ) ),
|
||||
'fromEmail' => $fromEmail ?: \IPS\Settings::i()->email_out,
|
||||
'fromName' => $fromName ?: \IPS\Settings::i()->board_name,
|
||||
'additionalHeaders' => $additionalHeaders,
|
||||
'subject' => $this->compileSubject( static::_getMemberFromRecipients( $to ) ),
|
||||
'html' => $this->compileContent( 'html', static::_getMemberFromRecipients( $to ) ),
|
||||
'plaintext' => $this->compileContent( 'plaintext', static::_getMemberFromRecipients( $to ) ),
|
||||
'precedence' => ( $this->type === static::TYPE_LIST ) ? 'list' : ( $this->type === static::TYPE_BULK ? 'bulk' : '' )
|
||||
) );
|
||||
}
|
||||
catch( \IPS\Http\Request\Exception $e )
|
||||
{
|
||||
throw new \IPS\Email\Outgoing\Exception( $e->getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user