Created
February 2, 2019 02:54
-
-
Save sgyyz/8f6bc8c13fd942ab4e8cd00b7dae26df to your computer and use it in GitHub Desktop.
email-spring-boot-starter example
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
public class GreetingService { | |
@Autowired | |
private EmailService emailService; | |
public void sendEmail() { | |
try { | |
Map<String, Object> ctx = ImmutableMap.of("name", "Mr. Smith"); | |
emailService.sendHtmlMail("Sender <[email protected]>", "greeting", Locale.CHINESE, ctx, "Mr. Smith <[email protected]>"); | |
} catch (MessagingException e) { | |
// ignored | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment