/**
 * KRA - Email API Service
 */
import request from '@/utils/request';
import type { ApiResponse } from '@/types/api';

export interface EmailTestParams {
  to: string;
  subject?: string;
  body?: string;
}

/** 发送测试邮件 */
export const emailTest = (data?: EmailTestParams) => {
  return request.post<ApiResponse<any>>('/email/emailTest', data || {});
};

/** 发送邮件 */
export const sendEmail = (data: EmailTestParams) => {
  return request.post<ApiResponse<any>>('/email/sendEmail', data);
};

export default {
  emailTest,
  sendEmail,
};
