Class EmailServiceImpl

java.lang.Object
com.app.service.impl.EmailServiceImpl
All Implemented Interfaces:
EmailService

@Service public class EmailServiceImpl extends Object implements EmailService
Implementation of the EmailService interface that provides functionality for sending emails.

This service uses JavaMailSender to send simple email messages with the provided recipient email, subject, and body. It encapsulates the logic for constructing and sending email messages via SMTP.

  • Constructor Details

    • EmailServiceImpl

      public EmailServiceImpl()
  • Method Details

    • send

      public void send(String email, String subject, String body)
      Sends an email with the specified recipient, subject, and body.

      This method creates a simple email message using SimpleMailMessage, sets the recipient's email address, subject, and body, and then sends it using the JavaMailSender.

      Specified by:
      send in interface EmailService
      Parameters:
      email - the recipient's email address
      subject - the subject of the email
      body - the body content of the email