Advertisement
Guest User

Untitled

a guest
Mar 17th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. final String username = "newemail543212345@gmail.com";
  2. final String password = "741852963qazwsxedc";
  3.  
  4. Properties props = new Properties();
  5. props.put("mail.smtp.auth", "true");
  6. props.put("mail.smtp.starttls.enable", "true");
  7. props.put("mail.smtp.host", "smtp.gmail.com");
  8. props.put("mail.smtp.port", "587");
  9.  
  10. Session session = Session.getInstance(props,
  11. new javax.mail.Authenticator() {
  12. protected PasswordAuthentication getPasswordAuthentication() {
  13. return new PasswordAuthentication(username, password);
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement