# Collapsar **Repository Path**: IllTamer_Gitee/collapsar ## Basic Information - **Project Name**: Collapsar - **Description**: Collapsar is a classic mailbox service implementation for Java. The service provides an easy-going email sending and receiving functionality. It provides a spring-boot-starter now ! - **Primary Language**: Java - **License**: AGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-06-14 - **Last Updated**: 2022-07-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Collapsar ### Introduction Collapsar is a classic mailbox service implementation for Java. The service provides an easy-going email sending and receiving functionality. It provides a spring-boot-starter now ! ### SMTP #### send You can use `MessageBuilder` easily construct a custom-email-object, then use `EmailSender` send it. If you want to have some email server proxy out the mail, send by `SMTPProxySender`. ```java public class Test { public static void main(String[] args) { Message smtp = MessageBuilder.mime() .properties() .add(MailFields.HOST, "mx1.qq.com") .add(MailFields.TRANSPORT_PROTOCOL, "smtp") .add(MailFields.SMTP.PORT, "25") .unauthenticated() .debug() .message() .source("Infinite_Server", "") .to("765743073@qq.com") .consume(message -> { message.setSubject("Hello IllTamer"); message.setText("awa\r\n2333333333333333\n666"); }) .done(); EmailSender sender = new SMTPSelfSender(); sender.sendMessage(smtp); } } ``` #### receive Run `SMTPServer#start` to start the listener server on port `25`.