Interface IBaseMailData

    • Method Detail

      • getSender

        default MailUser getSender()
        Gets the user that is sending the mail. Will be used for determining permissions when signing the mail. Note that this is not necessarily the same as the sender address returned by getFrom(), which is only used for the "From" header of the mail and may be set to an arbitrary value.

        Important: Currently it is okay to not implement this method and return null, but in future versions of the mail module this method will be required to return a non-null user, and if it returns null an exception may be thrown when sending the mail. So it is recommended to implement this method and return the user that is sending the mail.

        Returns:
        the user that is sending the mail, or null if no user information is available
        Since:
        8.6.0
      • buildMimeMessage

        @Deprecated
        default javax.mail.internet.MimeMessage buildMimeMessage​(javax.mail.Session session)
                                                          throws Exception
        Deprecated.
        Throws:
        Exception
      • buildMimeParts

        @Deprecated
        default javax.mail.internet.MimePart[] buildMimeParts​(javax.mail.Session session)
                                                       throws Exception
        Deprecated.
        Throws:
        Exception
      • getBcc

        javax.mail.Address[] getBcc()
      • getCc

        javax.mail.Address[] getCc()
      • getFrom

        javax.mail.Address getFrom()
      • getMimeMessage

        @Deprecated
        default javax.mail.internet.MimeMessage getMimeMessage​(javax.mail.Session session)
                                                        throws Exception
        Deprecated.
        Throws:
        Exception
      • getReply

        javax.mail.Address[] getReply()
      • getSecurityConfig

        IMailSecurityConfig getSecurityConfig()
        Gets the security configuration for this mail, which controls whether and how the mail should be encrypted and/or signed, and what to do if encryption/signing fails.
        Returns:
        security configuration for this mail
      • getSendSeparateMails

        boolean getSendSeparateMails()
        Flag to indicate that mails should be send separately to the to-recipient. Cc- and Bcc-recipients will be ignored because its not clear how to handle them
        Returns:
        true if mails should be separately, false otherwise
      • getSubject

        String getSubject()
      • getTo

        javax.mail.Address[] getTo()
        Returns:
        the to