import type { EmitterLike } from '@adonisjs/core/types/events';
import { BaseMail } from './base_mail.js';
import type { MailEvents, MailerConfig, MailerContract, MailerMessenger, NodeMailerMessage, MailTransportContract, MessageBodyTemplates, MessageComposeCallback } from './types.js';
/**
 * The Mailer acts as an adapter that wraps a transport and exposes
 * consistent API for sending and queueing emails
 */
export declare class Mailer<Transport extends MailTransportContract> implements MailerContract<Transport> {
    #private;
    name: string;
    transport: Transport;
    config: MailerConfig;
    constructor(name: string, transport: Transport, emitter: EmitterLike<MailEvents>, config?: MailerConfig);
    /**
     * Configure the messenger to use for sending email asynchronously
     */
    setMessenger(messenger: MailerMessenger): this;
    /**
     * Sends a compiled email using the underlying transport
     */
    sendCompiled(mail: {
        message: NodeMailerMessage;
        views: MessageBodyTemplates;
    }, sendConfig?: unknown): Promise<Awaited<ReturnType<Transport['send']>>>;
    /**
     * Queues a compiled email
     */
    sendLaterCompiled(compiledMessage: {
        message: NodeMailerMessage;
        views: MessageBodyTemplates;
    }, sendConfig?: unknown): Promise<void>;
    /**
     * Sends email
     */
    send(callbackOrMail: MessageComposeCallback | BaseMail, config?: Parameters<Transport['send']>[1]): Promise<Awaited<ReturnType<Transport['send']>>>;
    /**
     * Send an email asynchronously using the mail messenger. The
     * default messenger uses an in-memory queue, unless you have
     * configured a custom messenger.
     */
    sendLater(callbackOrMail: MessageComposeCallback | BaseMail, config?: Parameters<Transport['send']>[1]): Promise<void>;
    /**
     * Invokes `close` method on the transport
     */
    close(): Promise<void>;
}
