I'd like to use spring support for sending mails. My project is built with maven-2 and I use spring-core 2.5.5 I tried to look in maven central repo for artifact to include in my pom.xml, and the only one I found is spring support. The problem is that the highest version in repo is 2.0.8 and it depends on spring-core v. 2.0.8. Should I add it and exclude from its dependencies spring-core, spring-aop and so on, or should I look for another artifact (but which one will do?) or use another repo? Which is the proper maven-2 artifact for org.springframework.mail and where can I find it?
Spring Boot provides the ability to send emails via SMTP using the JavaMail Library. Here we will be illustrating step-by-step guidelines to develop Restful web services that can be used to send emails with or without attachments.
public interface JavaMailSender extends MailSender. Extended MailSender interface for JavaMail, supporting MIME messages both as direct arguments and through preparation callbacks. Typically used in conjunction with the MimeMessageHelper class for convenient creation of JavaMail MimeMessages , including attachments etc ...
It supports JavaMail MimeMessages and Spring SimpleMailMessages. SimpleMailMessage class: It is used to create a simple mail message including from, to, cc, subject and text messages. MimeMessagePreparator interface: It is the callback interface for the preparation of JavaMail MIME messages.
The mail stuff is found, rather bizarrely, in the context-support artifact.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With