Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

+34 -1
View File
@@ -10,6 +10,9 @@
namespace IPS\Email\Outgoing;
use IPS\Helpers\Form\Text;
use IPS\Settings;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
@@ -55,7 +58,7 @@ class _PHP extends \IPS\Email
try
{
if ( !mail( $this->_parseRecipients( $to, TRUE ), static::encodeHeader( $subject ), $this->_compileMessage( static::_getMemberFromRecipients( $to ), $boundary, "\r\n", 68 ), implode( "\r\n", $headers ), \IPS\Settings::i()->php_mail_extra ) )
if ( !mail( $this->_parseRecipients( $to, TRUE ), static::encodeHeader( $subject ), $this->_compileMessage( static::_getMemberFromRecipients( $to ), $boundary, "\r\n", 68 ), implode( "\r\n", $headers ), Settings::i()->php_mail_extra ) )
{
if ( $error = \IPS\IPS::$lastError )
{
@@ -73,4 +76,34 @@ class _PHP extends \IPS\Email
throw new \IPS\Email\Outgoing\Exception( $e->getMessage() );
}
}
/**
* Is this email class usable?
*
* @param string $type Email Type
* @return bool
*/
public static function isUsable( string $type ): bool
{
if( !\IPS\CIC )
{
return true;
}
return false;
}
/**
* Form fields for email handler
* These will automatically toggle on when the email handler is selected to be used
*
* @return array
*/
public static function form(): array
{
$form = [];
$form['php_mail_extra'] = new Text( 'php_mail_extra', Settings::i()->php_mail_extra, FALSE, [], NULL, NULL, NULL, 'php_mail_extra' );
return $form;
}
}