[Mailmunge] Mailmunge::Response syntax
list at ptld.com
list at ptld.com
Tue Jul 30 15:26:08 EDT 2024
Some follow up questions in the same theme.
Does Mailmunge::Response->REJECT(...) need to be returned by the filter_*{} or does it get set and checked after the filter returns?
sub filter_recipient {
return Mailmunge::Response->REJECT(...);
}
sub filter_recipient {
Mailmunge::Response->REJECT(...);
return;
}
Do these two work the same? The reason i ask is because there is $ctx->message_rejected. Does $ctx->message_rejected get defined when the response is invoked?
sub filter_recipient {
Mailmunge::Response->REJECT(...);
return if $ctx->message_rejected;
...
}
Is that ^^^ valid?
And is there something like $ctx->message_rejected but for knowing if Mailmunge::Response->CONTINUE() was used to do something like this?
sub filter_recipient {
if ($condition1) {
Mailmunge::Response->REJECT(...);
} elseif ($condition2) {
Mailmunge::Response->CONTINUE();
}
if ($ctx->message_rejected || ??? ) {return;}
...
}
More information about the Mailmunge
mailing list