Why GMail is accepting to send mail without Authentication?
问题 public class SendMail { private class SMTPAuthenticator extends javax.mail.Authenticator { @Override public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication("userID", "pwd"); } } public void sendMail() throws Exception { String strFromIds = "xyz@gmail.com"; String strToIds = "xyz@domain.com"; String strSubject = "Sample Mail Subject."; String strContent = "Sample Mail Content"; Properties objProperties = System.getProperties(); objProperties.put("mail