Interface IMailSecurity


  • public interface IMailSecurity
    Interface for mail-encryptors
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • encryptMessageBody

        IMailEncryptionResult encryptMessageBody​(javax.mail.internet.MimeBodyPart bodyPart,
                                                 Long tenantId,
                                                 javax.mail.Address... recipients)
                                          throws MailSecurityException
        Encrypts the body of a mail message using the given MimeBodyPart and recipient Addresses.
        Parameters:
        bodyPart - the MimeBodyPart to encrypt
        tenantId - The ID of the tenant for which the mail is sent.
        recipients - the recipient Addresses to encrypt for
        Returns:
        The IMailEncryptionResult containing the encrypted MimeBodyPart and the results for each recipient
        Throws:
        MailSecurityException - on errors during encryption
        Since:
        8.6.0
      • signMessageBody

        javax.mail.internet.MimeBodyPart signMessageBody​(javax.mail.internet.MimeBodyPart bodyPart,
                                                         Long tenantId,
                                                         javax.mail.Address senderAddress,
                                                         MailUser senderUser)
                                                  throws MailSecurityException
        Signs the mail message using the given IBaseMailData and sender Address.
        Parameters:
        bodyPart - the body to sign
        tenantId - The ID of the tenant for which the mail is sent.
        senderAddress - the sender address to sign with
        senderUser - the user, that is sending the mail, which does not have to be the same as the sender address, but is used for permission checks when signing
        Returns:
        The signed MIME body part
        Throws:
        MailSecurityException - on errors during signing
        Since:
        8.6.0
      • signMessageBody

        @Deprecated(since="8.6.0",
                    forRemoval=true)
        default javax.mail.internet.MimeBodyPart signMessageBody​(javax.mail.internet.MimeBodyPart bodyPart,
                                                                 Mandant client,
                                                                 javax.mail.Address sender)
                                                          throws MailSecurityException
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 8.6.0, use signMessageBody(MimeBodyPart, Long, Address, MailUser) instead, which allows to pass the sender user for permission checks
        Signs the mail message using the given IBaseMailData and sender Address.
        Parameters:
        bodyPart - the MimeBodyPart to sign
        client - The current Mandant for which the mail is sent.
        sender - the sender Address to sign with
        Returns:
        The signed MimeBodyPart
        Throws:
        MailSecurityException - on errors during signing