import nodemailer from "nodemailer";
import type { PrismaClient, SmtpConfiguration, TpSmtpConfiguration } from "@prisma/client";
export type SmtpConfigInput = {
    senderName: string;
    senderEmail: string;
    smtpHost: string;
    smtpPort: string;
    smtpUser: string;
    smtpPassword: string;
    smtpType: "default" | "tls" | "ssl";
    status: "1" | "0";
};
export declare function getActiveSmtp(prisma: PrismaClient): Promise<SmtpConfiguration | null>;
export declare function getActiveTpSmtp(prisma: PrismaClient, projectId: bigint, trainingProviderId: bigint): Promise<TpSmtpConfiguration | null>;
type SmtpLikeConfig = Pick<SmtpConfiguration, "smtpHost" | "smtpPort" | "smtpType" | "smtpUser" | "smtpPassword">;
type RenderedEmail = {
    text: string;
    html: string;
};
export declare function createTransportFromConfig(c: SmtpLikeConfig): nodemailer.Transporter<import("nodemailer/lib/smtp-transport/index.js").SentMessageInfo, import("nodemailer/lib/smtp-transport/index.js").Options>;
export declare function sendTestEmail(prisma: PrismaClient, to: string, subject: string, body: string): Promise<void>;
export declare function sendTwoFactorEmail(prisma: PrismaClient, to: string, code: string, minutesValid: number): Promise<void>;
export declare function sendProviderWelcomeEmail(prisma: PrismaClient, to: string, providerName: string, temporaryPassword: string): Promise<{
    mode: "log";
    sent: false;
    messageId?: undefined;
    accepted?: undefined;
} | {
    mode: "smtp";
    sent: true;
    messageId: string;
    accepted: (string | import("nodemailer/lib/mailer/index.js").Address)[];
}>;
export declare function sendTpStaffWelcomeEmail(prisma: PrismaClient, to: string, staffName: string, providerName: string, roleLabel: string, scopeSummary: string[], temporaryPassword: string): Promise<{
    mode: "log";
    sent: false;
    messageId?: undefined;
    accepted?: undefined;
} | {
    mode: "smtp";
    sent: true;
    messageId: string;
    accepted: (string | import("nodemailer/lib/mailer/index.js").Address)[];
}>;
export declare function sendUserWelcomeEmail(prisma: PrismaClient, to: string, userName: string, temporaryPassword: string): Promise<{
    mode: "log";
    sent: false;
    messageId?: undefined;
    accepted?: undefined;
} | {
    mode: "smtp";
    sent: true;
    messageId: string;
    accepted: (string | import("nodemailer/lib/mailer/index.js").Address)[];
}>;
export declare function buildPasswordResetUrl(token: string): string;
/** Resend welcome email with username + password reset link (no raw password). */
export declare function sendUserWelcomeResendEmail(prisma: PrismaClient, to: string, userName: string, passwordResetUrl: string): Promise<{
    mode: "log";
    sent: false;
    messageId?: undefined;
    accepted?: undefined;
} | {
    mode: "smtp";
    sent: true;
    messageId: string;
    accepted: (string | import("nodemailer/lib/mailer/index.js").Address)[];
}>;
export declare function sendFeedbackResponseEmailWithTpSmtp(prisma: PrismaClient, projectId: bigint, trainingProviderId: bigint, to: string, subject: string, body: string, useSystemFallback?: boolean): Promise<void>;
export declare function buildAlertEmailContent(args: {
    title: string;
    message: string;
    alertType: string;
    severity: string;
}): RenderedEmail;
export declare function buildAdminDigestEmailContent(args: {
    digestDate: string;
    openAlertsCount: number;
    lines: string[];
}): RenderedEmail;
export declare function buildGenericNoticeEmailContent(args: {
    subject: string;
    message: string;
}): RenderedEmail;
export declare function sendPublicFeedbackAcknowledgement(prisma: PrismaClient, args: {
    to: string;
    submitterName: string;
    category: "complaint" | "suggestion" | "question" | "appreciation";
    referenceCode: string;
    providerName: string;
    subject: string;
    dueAt: Date;
}): Promise<void>;
export declare function sendFeedbackResolvedNotificationWithTpSmtp(prisma: PrismaClient, args: {
    projectId: bigint;
    trainingProviderId: bigint;
    to: string;
    submitterName: string;
    referenceCode: string;
    category: "complaint" | "suggestion" | "question" | "appreciation";
    subject: string;
    resolvedAt: Date;
}): Promise<void>;
export declare function sendNewFeedbackNotificationToProvider(prisma: PrismaClient, args: {
    projectId: bigint;
    trainingProviderId: bigint;
    referenceCode: string;
    category: string;
    subject: string;
    submitterName: string;
    submittedAt: Date;
    dueAt: Date;
}): Promise<void>;
export declare function sendFeedbackDueDateReminderToProvider(prisma: PrismaClient, args: {
    projectId: bigint;
    trainingProviderId: bigint;
    feedbackId: bigint;
    referenceCode: string;
    category: string;
    subject: string;
    submitterName: string;
    submittedAt: Date;
    dueAt: Date;
}): Promise<void>;
export {};
//# sourceMappingURL=smtp.d.ts.map