SongGuess
    Preparing search index...

    An email message that is sent to a consumer Worker and can be rejected/forwarded.

    interface ForwardableEmailMessage {
        from: string;
        headers: Headers;
        raw: ReadableStream<Uint8Array<ArrayBufferLike>>;
        rawSize: number;
        to: string;
        forward(rcptTo: string, headers?: Headers): Promise<EmailSendResult>;
        reply(message: EmailMessage): Promise<EmailSendResult>;
        setReject(reason: string): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    from: string

    Envelope From attribute of the email message.

    headers: Headers
    raw: ReadableStream<Uint8Array<ArrayBufferLike>>

    Stream of the email message content.

    rawSize: number

    Size of the email message content.

    to: string

    Envelope To attribute of the email message.

    Methods

    • Forward this email message to a verified destination address of the account.

      Parameters

      • rcptTo: string

        Verified destination address.

      • Optionalheaders: Headers

      Returns Promise<EmailSendResult>

      A promise that resolves when the email message is forwarded.

    • Reply to the sender of this email message with a new EmailMessage object.

      Parameters

      Returns Promise<EmailSendResult>

      A promise that resolves when the email message is replied.

    • Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.

      Parameters

      • reason: string

        The reject reason.

      Returns void

      void