Skip to main content

Reply to Inbound Emails

When receiving an email through webhooks, you can easily reply to the sender while preserving conversation threading in the recipient’s mail client.

Preserving Threading

To ensure the reply appears in the same email thread:
  1. Extract the Message-ID from the incoming email’s headers.
  2. When calling mailofly.emails.send(), pass headers:
    • In-Reply-To: Set to the incoming Message-ID.
    • References: Set to the incoming References plus the incoming Message-ID.
    • Subject: Prefix with Re: (if not already present).