|
@@ -1,13 +1,14 @@
|
|
|
package org.springblade.los.email.controller;
|
|
package org.springblade.los.email.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import com.echepei.dto.mail.MailDto;
|
|
|
|
|
+import com.echepei.utils.mail.SendMailUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.los.email.service.EMailService;
|
|
import org.springblade.los.email.service.EMailService;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.thymeleaf.context.Context;
|
|
import org.thymeleaf.context.Context;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
@@ -77,4 +78,14 @@ public class EmailController {
|
|
|
emailService.send(to, "激活码模板邮件", context, file);
|
|
emailService.send(to, "激活码模板邮件", context, file);
|
|
|
return "发送成功!!";
|
|
return "发送成功!!";
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/sendMailByFile")
|
|
|
|
|
+ public R<String> sendMailByFile(@RequestBody MailDto mailDto){
|
|
|
|
|
+ SendMailUtil.sendFileMail(mailDto);
|
|
|
|
|
+ return R.status(true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|