import { Injectable } from '@nestjs/common' ; import { MailerService } from '@nest-modules/mailer' ; @ Injectable ( ) export class EmailService { constructor ( private readonly mailerService ) { } sendEmail ( ) { this . mailerService . sendMail ( { to : 'flana_zhong@163.com' , from : '1255968521@qq.com' , subject : 'Walker Lee Love You ✔' , template : './welcome' , context : { code : 'cf1a3f828287' , username : 'walker lee' , } , } ) ; } }