Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Created November 14, 2016 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/804f50b16fedd24247d08e3a912e3fe9 to your computer and use it in GitHub Desktop.
Save tassioauad/804f50b16fedd24247d08e3a912e3fe9 to your computer and use it in GitHub Desktop.
MimeMessage message = new MimeMessage (session);
message.setFrom(new InternetAddress("emailrementente@servidor.com"));
Address[] toUser = InternetAddress.parse("emaildestinatario@servidor.com");
message.setRecipients(Message.RecipientType.TO, toUser);
message.setSubject("Assunto");
message.setText("Texto", "utf-8", "html");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment