Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 31
Trigger Inbound Rules
Igor Balos edited this page Nov 13, 2017
·
2 revisions
Inbound rules allow you to filter out email which is going to be processed. If it matches rules, it can be rejected.
For these API requests you will need to use a server API token. Once you obtain it, you will need to use server API client.
ApiClientclient = Postmark.getApiClient(<servertoken>);Create an inbound rule.
// create inbound ruleInboundRuleResponserule = client.createInboundRule("igor@example.com");
IntegerruleId = rule.getId();List all inbound rules.
// list inbound rulesInboundRulesrules = client.getInboundRules(Parameters.init().build("offset",0).build("count",4));
System.out.println(rules.getInboundRules().get(0).getRule());Delete an inbound rule.
// delete inbound ruleStringresponse = client.deleteInboundRule(ruleId);For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.