NAME
Kernel::Test::Role::Environment::DeployEmailSettings – rolle to apply email configuration settings.
PUBLIC INTERFACE
has 'NeedEmailChecks'
this attribute controls if outbound email checks are needed or not (default) during the execution of the test case. Override it to change the default value like this:
has '+NeedEmailChecks' => (
default => 1,
);
has 'SendmailModule'
this attribute contains the sendmail module (default, DoNotSendEmail) to be used during the execution of the test case. Override it to change the default value like this:
has '+SendmailModule' => (
default => 'Test',
);
after 'StartHook'
disable or enable email checks and set sendmail module at the beginning of the test
SetSendmailModule()
set config setting 'SendmailModule' by parameter or attribute of the same name
EnableEmailChecks
set config settings 'CheckMXRecord' and 'CheckEmailAddresses' true
DisableEmailChecks
set config settings 'CheckMXRecord' and 'CheckEmailAddresses' false