Interface IMailContext

    • Method Detail

      • send

        void send​(IBaseMailData mailData)
           throws Exception
        Sends an mail based on the given data
        Parameters:
        mailData - the mail data
        Throws:
        Exception - on errors while sending the mail
      • send

        void send​(IBaseMailData mail,
                  Mandant client)
           throws Exception
        Sends an mail based on the given data
        Parameters:
        mail - Data of the email to send.
        client - the client to use for placeholder replacements
        Throws:
        Exception - on errors while sending the mail
      • setAddressFilter

        @Deprecated
        default void setAddressFilter​(de.xima.cmn.filter.IGenericFilter<javax.mail.Address> addressFilter)
        Deprecated.
        Sets an filter for excluding mail addresses during send
        Parameters:
        addressFilter - the address filter to set
      • setAddressFilter

        void setAddressFilter​(Predicate<javax.mail.Address> addressFilter)
        Sets an filter for excluding mail addresses during send
        Parameters:
        addressFilter - the address filter to set
        Since:
        8.0.0
      • getServerData

        IMailServerData getServerData()
        Gets the mail server data of the context
        Returns:
        the server data
      • archive

        void archive​(IBaseMailData mail,
                     Mandant client,
                     File file)
              throws Exception
        Create an archived file of the mail.
        Parameters:
        mail - Data of the email to send.
        client - The client to use for placeholder replacements.
        file - The file to write to.
        Throws:
        Exception - When the archive file could not be created.