Interface IMailClient

  • All Known Implementing Classes:
    MailClient

    public interface IMailClient
    Implementations of this interface are able to send email.
    • Method Detail

      • sendMessage

        @Deprecated
        void sendMessage​(java.lang.String subject,
                         java.lang.String content,
                         java.lang.String replyToOrNull,
                         From fromOrNull,
                         java.lang.String... recipients)
                  throws ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
        Deprecated.
        Use sendEmailMessage(String, String, EMailAddress, EMailAddress, EMailAddress...) instead. They do proper escaping of personal names with comas and semi-colons.
        Warning: deprecated, use sendEmailMessage(String, String, EMailAddress, EMailAddress, EMailAddress...) instead. They do proper escaping of personal names with comas and semi-colons.

        Sends a mail with given subject and content to given recipients.
        Parameters:
        replyToOrNull - reply-to part of the email header. Can be null.
        fromOrNull - from part of the email header. Can be null. If specified - will overwrite the 'from' value specified for the client.
        recipients - list of recipients (of type Message.RecipientType.TO)
        Throws:
        ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
      • sendEmailMessage

        void sendEmailMessage​(java.lang.String subject,
                              java.lang.String content,
                              EMailAddress replyToOrNull,
                              EMailAddress fromOrNull,
                              EMailAddress... recipients)
                       throws ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
        Sends a mail with given subject and content to given recipients.
        Parameters:
        replyToOrNull - Reply-to email header. Can be null.
        fromOrNull - from part of the email header. Can be null. If specified - will overwrite the 'from' value specified for the client.
        recipients - list of recipients (of type Message.RecipientType.TO)
        Throws:
        ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
      • sendMessageWithAttachment

        @Deprecated
        void sendMessageWithAttachment​(java.lang.String subject,
                                       java.lang.String content,
                                       java.lang.String filename,
                                       javax.activation.DataHandler attachmentContent,
                                       java.lang.String replyToOrNull,
                                       From fromOrNull,
                                       java.lang.String... recipients)
                                throws ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
        Deprecated.
        Use sendEmailMessageWithAttachment(String, String, String, DataHandler, EMailAddress, EMailAddress, EMailAddress...) instead. They do proper escaping of personal names with comas and semi-colons.
        Sends a mail with given subject and content to given recipients, includig the given attachment
        Parameters:
        replyToOrNull - reply-to part of the email header. Can be null.
        fromOrNull - from part of the email header. Can be null. If specified - will overwrite the 'from' value specified for the client.
        recipients - list of recipients (of type Message.RecipientType.TO)
        Throws:
        ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
      • sendEmailMessageWithAttachment

        void sendEmailMessageWithAttachment​(java.lang.String subject,
                                            java.lang.String content,
                                            java.lang.String filename,
                                            javax.activation.DataHandler attachmentContent,
                                            EMailAddress replyToOrNull,
                                            EMailAddress fromOrNull,
                                            EMailAddress... recipients)
                                     throws ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
        Sends a mail with given subject and content to given recipients, includig the given attachment
        Parameters:
        replyToOrNull - Reply-to email header. Can be null.
        fromOrNull - from part of the email header. Can be null. If specified - will overwrite the 'from' value specified for the client.
        recipients - list of recipients (of type Message.RecipientType.TO)
        Throws:
        ch.systemsx.cisd.common.exceptions.EnvironmentFailureException
      • sendTestEmail

        void sendTestEmail()
        Sends a test email if a test address was configured for the mail client.