Documentation
    Preparing search index...

    Interface MailpitClientOptions

    Options for a MailpitClient instance.

    interface MailpitClientOptions {
        auth?: MailpitAuthCredentials;
        fetchOptions?: Omit<RequestInit, "method" | "body">;
    }
    Index

    Properties

    Properties

    Optional basic auth credentials.

    fetchOptions?: Omit<RequestInit, "method" | "body">

    Optional fetch options merged into every request. method and body are managed internally and cannot be overridden. Any headers provided here are merged with internally managed headers (Authorization, Content-Type), with internal headers taking precedence.

    { fetchOptions: { headers: { Cookie: "session=abc123" } } }
    
    import { Agent } from "undici";
    { fetchOptions: { dispatcher: new Agent({ connect: { rejectUnauthorized: false } }) } }