package com.quinn.task;

import com.quinn.common.EmailType;
import com.quinn.intergration.SendBMail;
import com.quinn.utils.SpringUtils;
import lombok.Data;

@Data
public class SendAsyncEmail implements Runnable{

    String username;

    String email;

    public SendAsyncEmail(String username, String email) {
        this.username = username;
        this.email = email;
    }

    @Override
    public void run() {
        SendBMail sendBMail = SpringUtils.getBean(SendBMail.class);
        sendBMail.sendOneParamMail(EmailType.SUCCESS,username,email);
    }
}
