Class EmailSenderServiceImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      org.springframework.mail.javamail.JavaMailSender emailSender  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createToken​(User user, java.lang.String token)  
      java.lang.String getContactSupplierTemplate​(java.lang.String messageText, java.lang.String fullName, java.lang.String mailTo)
      This method returns template.
      java.lang.String getMessageNotificationEmailTemplate​(java.lang.String messageText)
      This method returns template.
      java.lang.String getResetPasswordTemplate​(java.lang.String fullName, java.lang.String token)
      This method returns template.
      java.lang.String getTariffBookingEmailTemplate​(java.lang.String fullName)
      This method returns template.
      java.lang.String getUploadRequestEmailTemplate​(EmailMessage emailMessage)
      This method returns template.
      java.lang.String getVerificationEmailTemplate​(java.lang.String fullName, java.lang.String token)
      This method returns template.
      java.lang.String getWelcomeEmailTemplate​(java.lang.String fullName)
      This method returns template.
      void sendEmailWithAttachments​(java.lang.String to, java.lang.String subject, java.lang.String text, java.util.ArrayList<java.lang.String> attachments)
      This method send a email.
      void sendMimeMessage​(java.lang.String to, java.lang.String subject, java.lang.String message)
      This method send a email.
      void sendSimpleEmail​(java.lang.String to, java.lang.String subject, java.lang.String text)
      This method send a email.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • emailSender

        @Autowired
        public org.springframework.mail.javamail.JavaMailSender emailSender
    • Constructor Detail

      • EmailSenderServiceImpl

        public EmailSenderServiceImpl()
    • Method Detail

      • getVerificationEmailTemplate

        public java.lang.String getVerificationEmailTemplate​(java.lang.String fullName,
                                                             java.lang.String token)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getVerificationEmailTemplate in interface EmailSenderService
        Parameters:
        fullName - field for database entity
        token - field for database entity
        Returns:
        template of email
      • getWelcomeEmailTemplate

        public java.lang.String getWelcomeEmailTemplate​(java.lang.String fullName)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getWelcomeEmailTemplate in interface EmailSenderService
        Parameters:
        fullName - field for database entity
        Returns:
        template of email
      • getResetPasswordTemplate

        public java.lang.String getResetPasswordTemplate​(java.lang.String fullName,
                                                         java.lang.String token)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getResetPasswordTemplate in interface EmailSenderService
        Parameters:
        fullName - field for database entity
        token - field for database entity
        Returns:
        template of email
      • getMessageNotificationEmailTemplate

        public java.lang.String getMessageNotificationEmailTemplate​(java.lang.String messageText)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getMessageNotificationEmailTemplate in interface EmailSenderService
        Parameters:
        messageText - field for database entity
        Returns:
        template of email
      • getContactSupplierTemplate

        public java.lang.String getContactSupplierTemplate​(java.lang.String messageText,
                                                           java.lang.String fullName,
                                                           java.lang.String mailTo)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getContactSupplierTemplate in interface EmailSenderService
        Parameters:
        messageText - field for database entity
        fullName - field for database entity
        mailTo - field for database entity
        Returns:
        template of email
      • getTariffBookingEmailTemplate

        public java.lang.String getTariffBookingEmailTemplate​(java.lang.String fullName)
        Description copied from interface: EmailSenderService
        This method returns template.
        Specified by:
        getTariffBookingEmailTemplate in interface EmailSenderService
        Parameters:
        fullName - field for database entity
        Returns:
        template of email
      • sendSimpleEmail

        @Async("asyncTaskExecutor")
        public void sendSimpleEmail​(java.lang.String to,
                                    java.lang.String subject,
                                    java.lang.String text)
        Description copied from interface: EmailSenderService
        This method send a email.
        Specified by:
        sendSimpleEmail in interface EmailSenderService
        Parameters:
        to - field database entity whose will be send email
        subject - field for database entity and subject for email
        text - field for database entity and content for email
      • sendEmailWithAttachments

        @Async("asyncTaskExecutor")
        public void sendEmailWithAttachments​(java.lang.String to,
                                             java.lang.String subject,
                                             java.lang.String text,
                                             java.util.ArrayList<java.lang.String> attachments)
        Description copied from interface: EmailSenderService
        This method send a email.
        Specified by:
        sendEmailWithAttachments in interface EmailSenderService
        Parameters:
        to - field database entity whose will be send email
        subject - field for database entity and subject for email
        text - field for database entity and content for email
        attachments - the list of attachments
      • sendMimeMessage

        @Async("asyncTaskExecutor")
        public void sendMimeMessage​(java.lang.String to,
                                    java.lang.String subject,
                                    java.lang.String message)
        Description copied from interface: EmailSenderService
        This method send a email.
        Specified by:
        sendMimeMessage in interface EmailSenderService
        Parameters:
        to - field database entity whose will be send email
        subject - field for database entity and subject for email
        message - field for database entity and content for email