sendmock_outcome_rule_create
Add an email outcome rule. Add an SMS outcome rule.
Toolset rules.
| Input | Type | Description |
|---|---|---|
| channelrequired | string | Picks what to do. email: Add an email outcome rule. sms: Add an SMS outcome rule.One of: email, smsExample: email |
| patternrequired | string | Exact address, or * wildcards, e.g. *@bounce.qa.test.Example: *@bounce.qa.test |
| outcomerequired | string | What happens to a matching email: delivered, hard_bounce, soft_bounce, complaint, unsubscribe or reject (refused during SMTP RCPT and the HTTP send).One of: delivered, hard_bounce, soft_bounce, complaint, unsubscribe, rejectExample: hard_bounce |
| smtp_code | string | SMTP reply for bounces and rejects, e.g. 550 5.1.1.Example: 550 5.1.1 |
| diagnostic | string | The diagnostic text sent with the SMTP code.Example: user unknown |
| noterequired | string | Why the rule exists, shown in the list.Example: Bounce every QA signup |
| is_enabledrequired | boolean | Off rules are kept but skipped.Example: true |
| match_field | string | Match the pattern against the recipient ( to) or the sender (from).One of: to, fromExample: to |
| error_code | string | Required for reject, undelivered and failed.Example: 30003 |
| delay_seconds | number | Required for delayed_delivery.Example: 30 |
Example call
{
"name": "sendmock_outcome_rule_create",
"arguments": {
"channel": "email",
"pattern": "*@bounce.qa.test",
"outcome": "hard_bounce",
"note": "Bounce every QA signup",
"is_enabled": true,
"smtp_code": "550 5.1.1",
"diagnostic": "user unknown"
}
}Result: EmailOutcomeRule | SmsOutcomeRule
- API
channel: emailPOST/api/v1/outcome-rules/emailchannel: smsPOST/api/v1/outcome-rules/sms- CLI
sendmock outcome-rule email create,sendmock outcome-rule sms create- In the app
- Settings > Email > Custom outcome addresses > Add address; Settings > SMS > Custom outcome numbers > Add number