-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new mail filter to decide mail sending per instance
- Loading branch information
Showing
5 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.sargue.mailgun; | ||
|
||
/** | ||
* A filter to decide if a mail should be sent or not. | ||
* | ||
* This filter acts upon invokation of the different send methods in the | ||
* {@link Mail} class preventing the actual request to Mailgun if the | ||
* filter returns false. | ||
* | ||
* One implementation of this filter can be registered on a {@link Configuration}. | ||
*/ | ||
public interface MailSendFilter { | ||
|
||
/** | ||
* Decide if this mail should be sent. | ||
* | ||
* @param mail the mail to check | ||
* @return true if the process of sending the email should continue | ||
*/ | ||
boolean filter(Mail mail); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters