Last active
February 8, 2017 10:56
-
-
Save edermfl/b0bde3786536859b498eb234941476e6 to your computer and use it in GitHub Desktop.
Serviço responsável pelo envio do e-mail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class SenderMailService { | |
@Autowired | |
private JavaMailSender mailSender; | |
private void enviar() { | |
SimpleMailMessage email = new SimpleMailMessage(); | |
email.setTo("teste@gmail.com"); | |
email.setSubject("Teste envio de e-mail"); | |
email.setText("Enviei este e-mail usando Spring Boot."); | |
mailSender.send(email); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment