Skip to main content
Latest
File

mail route

Create a file named mail.ts in the root directory of your project.

import { mail } from 'darkflare'

mail(c => {
  ...
})

Context (c)

  • env

  • message

    • from (string)
    • to (string)
    • headers
    • stream (ReadableStream) - Stream of the message content.
    • size (number) - Size of the message content.
    • reject(reason) - Reject this message by returning a permanent SMTP error back to the connecting client, including the given reason.
    • forward(address) - Forward this message to a verified destination address of the account.
  • waitUntil(promise)