• 大小: 0.04M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-17
  • 标签: 邮件  SMTP  QQ  java  邮箱  

资源简介


资源截图

代码片段和文件信息

import io.github.biezhi.ome.OhMyEmail;

import javax.mail.MessagingException;
import javax.swing.SwingUtilities;

public class Index {
    //程序入口
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                String password=“xxxxxxx“;//此处的密码不是登陆qq邮箱的密码,是开启配置邮箱客户端时得到的授权码配置方法详见 http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256
                OhMyEmail.config(OhMyEmail.SMTP_QQ(true) “375216284@qq.com“ password);
                try {
                    OhMyEmail.subject(“这是一封测试TEXT邮件“)
                            .from(“好例子网的QQ邮箱“)
                            .to(“375212060@qq.com“)
                            .text(“信件内容“)
                        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-21 13:35  .idea\
     文件         630  2018-08-16 01:28  .idea\compiler.xml
     目录           0  2018-08-21 13:36  .idea\inspectionProfiles\
     目录           0  2018-08-21 13:15  .idea\libraries\
     文件         525  2018-08-21 13:15  .idea\libraries\Maven__com_sun_mail_javax_mail_1_6_0.xml
     文件         548  2018-08-21 13:15  .idea\libraries\Maven__io_github_biezhi_oh_my_email_0_0_3.xml
     文件         527  2018-08-21 13:15  .idea\libraries\Maven__javax_activation_activation_1_1.xml
     文件         439  2018-08-16 01:21  .idea\misc.xml
     文件         258  2018-08-16 01:19  .idea\modules.xml
     文件        8792  2018-08-16 01:21  .idea\uiDesigner.xml
     文件       30708  2018-08-21 13:35  .idea\workspace.xml
     文件        1013  2018-08-21 13:15  pom.xml
     目录           0  2018-08-16 01:19  src\
     目录           0  2018-08-16 01:19  src\main\
     目录           0  2018-08-21 13:35  src\main\java\
     文件        1085  2018-08-21 13:35  src\main\java\Index.java
     目录           0  2018-08-21 13:36  src\main\resources\
     目录           0  2018-08-16 01:19  src\test\
     目录           0  2018-08-21 13:36  src\test\java\
     文件        1119  2018-08-21 13:15  swingdemo.iml
     目录           0  2018-08-16 01:22  target\
     目录           0  2018-08-21 13:32  target\classes\
     文件         570  2018-08-21 13:28  target\classes\Form1$1.class
     文件         457  2018-08-21 13:28  target\classes\Form1$2.class
     文件        1580  2018-08-21 13:28  target\classes\Form1.class
     文件        1125  2018-08-21 13:32  target\classes\Index$1.class
     文件         503  2018-08-21 13:32  target\classes\Index.class
     目录           0  2018-08-21 13:24  target\classes\com\
     目录           0  2018-08-21 13:24  target\classes\com\intellij\
     目录           0  2018-08-21 13:24  target\classes\com\intellij\uiDesigner\
     目录           0  2018-08-21 13:24  target\classes\com\intellij\uiDesigner\core\
............此处省略13个文件信息

评论

共有 条评论