import {singleton} from "decorators/singleton"; import { NetClient} from "net/NetClient"; export const DEFAULT_VERIFY_HTML = `

Email Verification

CEBG needs to confirm your email address is still valid. Please click the link below to confirm you received this mail.

Verify Email

If you're worried about this email being legitimate, you can visit CEBG directly to confirm your email needs verifying. After doing so, please don't forget to click the link above.

` export interface IMailData { from?: string to: string subject?: string text?: string html?: string } const DEFAULT_MSG_DATA: IMailData = { from: '自己人 ', to: '', subject: 'Please verify your email address' } const MAIL_SVR = 'http://127.0.0.1:3087' @singleton export class EmailSvr { public sendMail(msg: IMailData) { Object(DEFAULT_MSG_DATA).zssign(msg) let reqData = { url: MAIL_SVR+'/mail/send', data: JSON.stringify({message: msg}) } return new NetClient().httpPost(reqData) } }