declare module 'nodemailer' {
  export interface SendMailOptions {
    from: string;
    to: string;
    subject: string;
    text: string;
    html: string;
  }

  export interface SentMessageInfo {
    messageId?: string;
  }

  export interface Transporter {
    sendMail(message: SendMailOptions): Promise<SentMessageInfo>;
  }

  export function createTransport(options: {
    host: string;
    port: number;
    secure: boolean;
    auth?: {
      user?: string;
      pass?: string;
    };
  }): Transporter;
}
