import { Message } from './message.js';
import { type Recipient, type MailerContract } from './types.js';
/**
 * Class based emails are self contained dispatchable
 * mail objects
 */
export declare abstract class BaseMail {
    /**
     * A flag to track if the message has been built
     */
    protected built: boolean;
    /**
     * A flag to track if the mail templates have been rendered
     */
    protected renderedTemplates: boolean;
    /**
     * Reference to the mail message object
     */
    message: Message;
    /**
     * Define the email subject
     */
    subject?: string;
    /**
     * Define the from address for the email
     */
    from?: Recipient;
    /**
     * Define the replyTo email address
     */
    replyTo?: Recipient;
    /**
     * Defines the subject on the message using the mail
     * class subject property
     */
    protected defineSubject(): void;
    /**
     * Defines the from on the message using the mail
     * class from property
     */
    protected defineSender(): void;
    /**
     * Prepares the email message
     */
    abstract prepare(): void | Promise<void>;
    /**
     * Builds the mail message for sending it
     */
    build(): Promise<void>;
    /**
     * Builds the mail message with the email contents.
     * This method will render the templates ahead of
     * time
     */
    buildWithContents(): Promise<void>;
    /**
     * Sends the mail
     */
    send<T extends MailerContract<any>>(mailer: T, config?: Parameters<T['send']>[1]): Promise<Awaited<ReturnType<T['transport']['send']>>>;
    /**
     * Sends the mail by using the background
     * messenger
     */
    sendLater<T extends MailerContract<any>>(mailer: T, config?: Parameters<T['send']>[1]): Promise<void>;
}
