Sending Mail using Spring and Gmail SMTP

Introduction Here we will see an example on sending mail using Spring email and Gmail SMTP server. We have other examples on sending emails using Spring or Java API, where we have used my own SMTP server to send emails but here we will see how to send email using Gmail SMTP server.

Send email with multiple attachments via Spring

This tutorial will show you how to send a basic mail via Spring framework’s email support. The Spring Framework provides a helpful utility library for sending email that shields the user from the specifics of the underlying mailing system and is responsible for low level resource handling on behalf of the client. I will show you both annotation based Spring…

Send email using email template library via Spring

This tutorial will show you how to send a basic mail via Spring framework’s email support using Velocity email template library. We will use class org.springframework.mail.javamail.MimeMessageHelper, which shields you from having to use the verbose JavaMail API. Using the MimeMessageHelper it is pretty easy to create a MimeMessage. The code in the other email sending examples explicitly created the content…

Send email with inline attachment or resource via Spring

This tutorial will show you how to send a basic mail via Spring framework’s email support. We will attach a resource (an image) as an inline attachment in the email body. The Spring Framework provides a helpful utility library class that comes in pretty handy when dealing with JavaMail messages is the org.springframework.mail.javamail.MimeMessageHelper class, which shields you from having to…

Send email with attachment via Spring

This tutorial will show you how to send a basic mail via Spring framework’s email support. A class that comes in pretty handy when dealing with JavaMail messages is the org.springframework.mail.javamail.MimeMessageHelper class, which shields you from having to use the verbose JavaMail API. Using the MimeMessageHelper, it is pretty easy to create a MimeMessage. Multipart email messages allow for both…

Send email via Spring – JavaMailSender and MimeMessageHelper

This tutorial will show you how to send a basic mail via Spring framework’s email support. A class that comes in pretty handy when dealing with JavaMail messages is the org.springframework.mail.javamail.MimeMessageHelper class, which shields you from having to use the verbose JavaMail API. Using the MimeMessageHelper it is pretty easy to create a MimeMessage. You can send simple text email…

Send email via Spring – JavaMailSender and MimeMessagePreparator

This tutorial will show you how to send a email via Spring framework’s email support. The Spring Framework provides a helpful utility library for sending email that shields the user from the specifics of the underlying mailing system and is responsible for low level resource handling on behalf of the client. The org.springframework.mail.javamail.JavaMailSender interface adds specialized JavaMail features such as…

Send email via Spring – MailSender and SimpleMailMessage

Introduction This tutorial will show you how to send a basic mail via Spring framework’s email support. The Spring Framework provides a helpful utility library for sending email that shields the user from the specifics of the underlying mailing system and is responsible for low level resource handling on behalf of the client. The central interface for sending emails is…