Videos
Check out our tutorial video series.
Configure Email Forwarding for Inbound Messages: MailSlurp allows you to create rules and forward incoming emails to specified addresses.
MailSlurp inboxes support email auto-forwarding using inbox forwarding rules. You can attach inbox forwarders to any inbox and configure rules that will forward inbound email to other email addresses based on matching fields within the email such as body, subject or sender.
Inbox forwarders are entities that can be attached to an inbox. There are one-way forwarders that match emails against a rulesets to determine whether the inbound message should be forwarded to a recipient associated with the forwarder. For two-way inbox proxies see the alias guide.
Inbox forwarders can have multiple rulesets. Rules use pattern matching applied to fields within an email. So for the above example a forwarder is matched on the email subject using the asterisk in as wildcard. This means inbound emails with
as a subject will be forwarded by the forwarder.
Inbox forwarding is configured for each inbox using the UI or the InboxForwarderControllerApi. Each inbox forwarder takes a ,
and
option.
Rules can match on different fields within an inbound email address:
For instance a rule using the field will match incoming email address senders against the
option in the inbox forwarder. Emails that match this rule will be forwarded to the recipients listed in the rules
option.
To configure rules in the MailSlurp dashboard navigate to the inbox forwarding page and create a new inbox forwarder for an inbox of your choice:
Let's create some inboxes with MailSlurp's javascript client and attach inbox forwarding rules.
Basic wildcard pattern matching is available:
Forwarding also works with RFC 5322 email addresses that contain a sender name:
For other use cases consider using email webhooks to process incoming emails and route them using your own server logic.
Check out our tutorial video series.
Email and SMS guides for automation and testing.
View github project code for multiple languages.
Latest posts from the MailSlurp team.
Test, build, and automate messaging with a free MailSlurp account.