RT::Interface::Email::Role - Role for mail plugins
package RT::Interface::Email::Action::Something;
use Role::Basic 'with';
with 'RT::Interface::Email::Role';
sub CheckACL { ... }
sub HandleSomething { ... }
Provides a means to affect the handling of RT's mail gateway. Mail plugins (which appear in "@MailPlugins" in RT_Config should implement this role.
See docs/extending/mail_plugins.pod for a list of hook points which plugins can implement.
This should be called for configuration errors. It results in a temporary failure code to the MTA, ensuring that the message is not lost, and will be retried later.
This function should be passed the warning message to log with the temporary failure. Does not return.
This should be used upon rejection of a message. It will not be retried by the MTA; as such, it should be used sparingly, and in conjunction with "MailError" such that the sender is aware of the failure.
The function should be passed a message to return to the mailgate. Does not return.
The message was successfully parsed. The function takes an optional RT::Ticket object to return to the mailgate. Does not return.
Sends an error concerning the email, or the processing thereof. Takes the following arguments:
Only necessary in "BeforeDecode" and BeforeDecrypt hooks, where it defaults to "OwnerEmail" in RT_Config; otherwise, defaults to the originator of the message.
Subject of the email
The body of the email
If passed a true value, will call "FAILURE" after sending the message.