Class EmailFunctions

java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.EmailFunctions
All Implemented Interfaces:
IEmailFunctions

public class EmailFunctions extends BaseFunctions implements IEmailFunctions
Utility functions used to send emails
Since:
5.4
  • Constructor Details

    • EmailFunctions

      public EmailFunctions(LogFunctions pFLOG)
  • Method Details

    • sendEmail

      public void sendEmail(String pSubject, String pBody, Long pGroupId)
      Sends an email using FlexDeploy's System Settings SMTP information to all users associated with FlexDeploy security group of specified Id.
      Specified by:
      sendEmail in interface IEmailFunctions
      Parameters:
      pSubject - The subject line for the email.
      pBody - The html body that will be used as the email body to be sent. A simple string can also be used instead of html.
      pGroupId - The FlexDeploy security group that the email will be sent to.
    • sendEmail

      public void sendEmail(String pSubject, String pBody, Long pGroupId, Collection<EmailAttachment> pAttachments)
      Sends emails using FlexDeploy's System Settings SMTP information to all users associated with FlexDeploy security group of specified Id.
      Specified by:
      sendEmail in interface IEmailFunctions
      Parameters:
      pSubject - The subject line for the email.
      pBody - The html body that will be used as the email body to be sent. A simple string can also be used instead of html.
      pGroupId - The FlexDeploy security group that the email will be sent to.
      pAttachments - Collection of EmailAttachment objects to include.
    • sendEmail

      public void sendEmail(String pSubject, String pBody, Collection<String> pRecipientAddresses)
      Sends emails using FlexDeploy's System Settings SMTP information to the Collection of email addresses specified.
      Specified by:
      sendEmail in interface IEmailFunctions
      Parameters:
      pSubject - The subject line for the email.
      pBody - The html body that will be used as the email body to be sent. A simple string can also be used instead of html.
      pRecipientAddresses - A Collection of email addresses that the email will be sent to.
    • sendEmail

      public void sendEmail(String pSubject, String pBody, Collection<String> pRecipientAddresses, Collection<EmailAttachment> pAttachments)
      Sends an email using FlexDeploy's System Settings SMTP information to the Collection of email addresses specified.
      Specified by:
      sendEmail in interface IEmailFunctions
      Parameters:
      pSubject - The subject line for the email.
      pBody - The html body that will be used as the email body to be sent. A simple string can also be used instead of html.
      pRecipientAddresses - A Collection of email addresses that the email will be sent to.
      pAttachments - Collection of EmailAttachment objects to include.
    • sendEmail

      public void sendEmail(String pSubject, String pBody, SendEmailOptions pSendEmailOptions, Collection<EmailAttachment> pAttachments)
      Specified by:
      sendEmail in interface IEmailFunctions
      Parameters:
      pSubject - The subject line for the email.
      pBody - The html body that will be used as the email body to be sent. A simple string can also be used instead of html.
      pSendEmailOptions - a SendEmailOptions POJO with the email recipients and aggregation settings.
      pAttachments - Collection of EmailAttachment objects to include.
    • getGroovyKey

      public String getGroovyKey()
      Specified by:
      getGroovyKey in interface IEmailFunctions
      Specified by:
      getGroovyKey in class BaseFunctions
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface IEmailFunctions
      Specified by:
      cleanup in class BaseFunctions