Attachments & Email Forwarding
Learn how to handle files attached to incoming emails and set up automatic email forwarding.Accessing Inbound Attachments
Inbound attachments are parsed automatically and made available via secure, pre-signed download URLs inside theattachments array of the email.received webhook payload:
- Download URLs are valid for 24 hours.
- Alternatively, you can retrieve the raw attachment stream via the Mailofly SDK:
Email Forwarding Rules
If you do not want to build a webhook handler and simply want incoming emails redirected to another email address:- Open Domains → select your receiving domain.
- Under Inbound Routing, click Add Forwarding Rule.
- Set the match rule:
- Catch-all (
*@yourdomain.com): Forwards any incoming email to your destination address. - Exact match (
hello@yourdomain.com): Forwards only specific mailbox aliases.
- Catch-all (
- Set the destination address (e.g.
team@gmail.com). - Click Save Rule. Mailofly will forward matching messages with original headers preserved.