Class EmailSenderServiceImpl

    • 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 sent email
        subject - field for database entity and subject for email
        message - field for database entity and content for email
      • sendOrderConfirmationEmail

        public void sendOrderConfirmationEmail​(EmailMessage emailMessage)
        Description copied from interface: EmailSenderService
        Sends a success email for the order.

        This method sends a success email for the order specified by the given email message.

        Specified by:
        sendOrderConfirmationEmail in interface EmailSenderService
        Parameters:
        emailMessage - the email message object containing the details of the success email
      • attachFile

        private void attachFile​(java.lang.String filePath,
                                javax.mail.Multipart multipart,
                                javax.mail.internet.MimeBodyPart messageBodyPart)
                         throws javax.mail.MessagingException
        Throws:
        javax.mail.MessagingException