Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+9 -6
View File
@@ -11,7 +11,7 @@
namespace IPS\Email\Outgoing;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -42,12 +42,15 @@ class _IpsCic extends \IPS\Email
/**
* Constructor
*
* @param string $apiKey API Key
* @return void
*/
public function __construct()
{
if ( \IPS\CIC and preg_match( '/^\/var\/www\/html\/(.+?)(?:\/|$)/i', \IPS\ROOT_PATH, $matches ) )
if ( \IPS\CIC2 AND isset( $_SERVER['IPS_CLOUD2_ID'] ) )
{
$this->community = $_SERVER['IPS_CLOUD2_ID'];
}
elseif ( \IPS\CIC and preg_match( '/^\/var\/www\/html\/(.+?)(?:\/|$)/i', \IPS\ROOT_PATH, $matches ) )
{
$this->community = $matches[1];
}
@@ -75,9 +78,9 @@ class _IpsCic extends \IPS\Email
{
\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 ) ),
'to' => array_map( 'trim', explode( ',', static::_parseRecipients( $to, TRUE ) ) ),
'cc' => array_map( 'trim', explode( ',', static::_parseRecipients( $cc, TRUE ) ) ),
'bcc' => array_map( 'trim', explode( ',', static::_parseRecipients( $bcc, TRUE ) ) ),
'fromEmail' => $fromEmail ?: \IPS\Settings::i()->email_out,
'fromName' => $fromName ?: \IPS\Settings::i()->board_name,
'additionalHeaders' => $additionalHeaders,