/** Datei: plugins/mailer/hooks/config.php **/ * @copyright 2025 ARUNOX * @version 1.0.0 * @since 1.0.0 File is created */ use ARUNOX\Core\Hooks; use ARUNOX\Plugins\Settings; Hooks::add('config::constants', function() { define( "MAILER_SEND_AS_HTML", Hooks::filter( 'config::constants->MAILER_SEND_AS_HTML', FALSE ) ); define( "MAIL_PORT", Hooks::filter( 'config::constants->MAIL_PORT', NULL ) ); define( "MAIL_HOST", Hooks::filter( 'config::constants->MAIL_HOST', NULL ) ); define( "MAIL_USER", Hooks::filter( 'config::constants->MAIL_USER', NULL ) ); define( "MAIL_PSWD", Hooks::filter( 'config::constants->MAIL_PSWD', NULL ) ); define( "MAIL_EMAIL", Hooks::filter( 'config::constants->MAIL_EMAIL', NULL ) ); define( "MAIL_SENDER", Hooks::filter( 'config::constants->MAIL_SENDER', "NoReply" ) ); }); Hooks::add( 'config::constants.type->MAILER_SEND_AS_HTML', function( $type ) { return Settings\Type::Switch; }); Hooks::add( 'config::constants.type->MAIL_EMAIL', function( $type ) { return Settings\Type::Mail; }); Hooks::add( 'config::constants.type->MAIL_HOST', function( $type ) { return Settings\Type::Url; }); Hooks::add( 'config::constants.type->MAIL_PORT', function( $type ) { return Settings\Type::Url; }); Hooks::add( 'config::constants.type->MAIL_USER', function( $type ) { return Settings\Type::Value; }); Hooks::add( 'config::constants.type->MAIL_SENDER', function( $type ) { return Settings\Type::Value; }); Hooks::add( 'config::constants.type->MAIL_PSWD', function( $type ) { return Settings\Type::Value; });