Java Mail Internals

Java EE 7 Technologies
http://www.oracle.com/technetwork/java/javaee/tech/index.html
http://www.oracle.com/technetwork/java/javamail/index.html
https://maven.java.net/content/repositories/snapshots/javax/mail/javax.mail-api/1.5.3-SNAPSHOT/
Session session = Session.getInstance(props, new Authenticator(){

            @Override
            protected PasswordAuthentication getPasswordAuthentication() {
               
                return new PasswordAuthentication("","");
            }
           
        });
return new Session;

session.getTransport("smtp")-->return new SMTPTransport

org.springframework.mail.javamail.JavaMailSenderImpl : Session=1:1

doSend-->getTransport(getSession()):new {protocol}Transport-->connect[host,port,u/p],transport.sendMessage,finally-->transport.close();

你可能感兴趣的:(java mail)