|
@@ -34,6 +34,17 @@ public class EmailUtil {
|
|
|
ImapStoreId.put("support-email", "fjhx@fjhx.com");
|
|
|
}
|
|
|
|
|
|
+ // @SneakyThrows
|
|
|
+ // public static void main(String[] args) {
|
|
|
+ // MailboxInfo mailboxInfo = new MailboxInfo();
|
|
|
+ // mailboxInfo.setReceiveHost("imap.gmail.com");
|
|
|
+ // mailboxInfo.setReceivePort(993);
|
|
|
+ // mailboxInfo.setMailUser("y2428241269@gmail.com");
|
|
|
+ // mailboxInfo.setMailPassword("upoujrquwweqtsuk");
|
|
|
+ // IMAPStore imapStore = getIMAPStore(mailboxInfo);
|
|
|
+ // System.out.println();
|
|
|
+ // }
|
|
|
+
|
|
|
/**
|
|
|
* 获取imapStore
|
|
|
* 993
|
|
@@ -86,20 +97,20 @@ public class EmailUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- public static void main(String[] args) throws Exception {
|
|
|
- ObsFile attachment = new ObsFile();
|
|
|
- attachment.setFileUrl("https://os.winfaster.cn/fjhx/saas/GrandStar/2023/03/08/png/3092592f2d614d83854fad5e4c107143.png");
|
|
|
- attachment.setFileName("board-1.png");
|
|
|
- SendDto.Address address = new SendDto.Address();
|
|
|
- address.setAddress("2428241269@qq.com");
|
|
|
- SendDto sendDto = new SendDto();
|
|
|
- sendDto.setTo(Collections.singletonList(address));
|
|
|
- sendDto.setFileList(Collections.singletonList(attachment));
|
|
|
- sendDto.setSubject("测试标题");
|
|
|
- sendDto.setContent("测试内容");
|
|
|
- sendMail("imap.qq.com", "2428241269@qq.com", "kdypajdrwfhtdihb", sendDto);
|
|
|
- }
|
|
|
+ //
|
|
|
+ // public static void main(String[] args) throws Exception {
|
|
|
+ // ObsFile attachment = new ObsFile();
|
|
|
+ // attachment.setFileUrl("https://os.winfaster.cn/fjhx/saas/GrandStar/2023/03/08/png/3092592f2d614d83854fad5e4c107143.png");
|
|
|
+ // attachment.setFileName("board-1.png");
|
|
|
+ // SendDto.Address address = new SendDto.Address();
|
|
|
+ // address.setAddress("2428241269@qq.com");
|
|
|
+ // SendDto sendDto = new SendDto();
|
|
|
+ // sendDto.setTo(Collections.singletonList(address));
|
|
|
+ // sendDto.setFileList(Collections.singletonList(attachment));
|
|
|
+ // sendDto.setSubject("测试标题");
|
|
|
+ // sendDto.setContent("测试内容");
|
|
|
+ // sendMail("imap.qq.com", "2428241269@qq.com", "kdypajdrwfhtdihb", sendDto);
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
/**
|