Interface BaseMail

All Known Subinterfaces:
IncomeMail, Mail
All Known Implementing Classes:
AbstractBaseMail, AbstractOutgoingMail, DelegatingMail, IncaIncomeMail, IncaMail, IncomeMailImpl, MailImpl

public interface BaseMail
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    addBcc(jakarta.mail.internet.InternetAddress address)
     
    void
    addBcc(String addresses)
    Add addresses from a String to "bcc".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addBcc(List<String> addresses)
    Add addresses from a List<String> to "bcc".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addCc(jakarta.mail.internet.InternetAddress address)
     
    void
    addCc(String addresses)
    Add addresses from a String to "cc".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addCc(List<String> addresses)
    Add addresses from a List to "cc".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addReplyTo(jakarta.mail.internet.InternetAddress address)
     
    void
    addReplyTo(String addresses)
    Add addresses from a String to "replyTo".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addReplyTo(List<String> addresses)
    Add addresses from a List<String> to "replyTo".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>"
    void
    addTo(jakarta.mail.internet.InternetAddress address)
     
    void
    addTo(String addresses)
    Add addresses from a String to "to".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses
    void
    addTo(List<String> addresses)
    Add addresses from a List<String> to "to".
    Can be either only email or email and name in format: "firstname lastname <email>.
    example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses
    void
     
    void
     
    void
     
    void
     
    void
     
    boolean
     
    createAttachment(jakarta.activation.MimeType mimeType)
     
    createAttachment(@Nullable String id, jakarta.activation.MimeType mimeType)
     
    createAttachment(@Nullable String id, @Nullable String fileName, Binary binary)
    Adds the given attachment to this mail.
     
    List<jakarta.mail.internet.InternetAddress>
     
    List<jakarta.mail.internet.InternetAddress>
     
    jakarta.mail.internet.InternetAddress
     
    @Nullable String
     
    List<jakarta.mail.internet.InternetAddress>
     
     
    @Nullable String
     
    List<jakarta.mail.internet.InternetAddress>
     
    boolean
     
    void
    setFrom(jakarta.mail.internet.InternetAddress from)
     
    void
    setHtml(@Nullable String html)
     
    void
    setSubject(@Nullable String subject)
     
    void
    setText(@Nullable String body)
     
  • Field Details

  • Method Details

    • getSubject

      String getSubject()
    • setSubject

      void setSubject(@Nullable @Nullable String subject)
    • getFrom

      jakarta.mail.internet.InternetAddress getFrom()
    • setFrom

      void setFrom(jakarta.mail.internet.InternetAddress from)
    • getTo

      List<jakarta.mail.internet.InternetAddress> getTo()
    • addTo

      void addTo(jakarta.mail.internet.InternetAddress address)
    • addTo

      void addTo(List<String> addresses)
      Add addresses from a List<String> to "to".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses
      Parameters:
      addresses - List
    • addTo

      void addTo(String addresses)
      Add addresses from a String to "to".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses
      Parameters:
      addresses - String separated with "," or "\n"
    • clearTo

      void clearTo()
    • getCc

      List<jakarta.mail.internet.InternetAddress> getCc()
    • addCc

      void addCc(jakarta.mail.internet.InternetAddress address)
    • addCc

      void addCc(List<String> addresses)
      Add addresses from a List to "cc".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - List
    • addCc

      void addCc(String addresses)
      Add addresses from a String to "cc".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - String separated with "," or "\n"
    • clearCc

      void clearCc()
    • getBcc

      List<jakarta.mail.internet.InternetAddress> getBcc()
    • addBcc

      void addBcc(jakarta.mail.internet.InternetAddress address)
    • addBcc

      void addBcc(List<String> addresses)
      Add addresses from a List<String> to "bcc".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - List
    • addBcc

      void addBcc(String addresses)
      Add addresses from a String to "bcc".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - String separated with "," or "\n"
    • clearBcc

      void clearBcc()
    • getReplyTo

      List<jakarta.mail.internet.InternetAddress> getReplyTo()
    • addReplyTo

      void addReplyTo(jakarta.mail.internet.InternetAddress address)
    • addReplyTo

      void addReplyTo(String addresses)
      Add addresses from a String to "replyTo".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - String separated with "," or "\n"
    • addReplyTo

      void addReplyTo(List<String> addresses)
      Add addresses from a List<String> to "replyTo".
      Can be either only email or email and name in format: "firstname lastname <email>.
      example: "Hans Meier <hmeier@tocco.ch>"
      Parameters:
      addresses - List
    • clearReplyTo

      void clearReplyTo()
    • getText

      @Nullable @Nullable String getText()
    • setText

      void setText(@Nullable @Nullable String body)
    • getHtml

      @Nullable @Nullable String getHtml()
    • setHtml

      void setHtml(@Nullable @Nullable String html)
    • getAttachments

      List<Attachment> getAttachments()
    • clearAttachments

      void clearAttachments()
    • createAttachment

      Attachment createAttachment(@Nullable @Nullable String id, @Nullable @Nullable String fileName, Binary binary)
      Adds the given attachment to this mail. The content is taken from the given binary. The returned attachment is restricted in that it is not allowed to load new content using methods Attachment.setContent(byte[]),Attachment.loadContent(java.io.InputStream) or Attachment.setMimeType(MimeType) for setting the mime type
      Parameters:
      id - optional id for this attachment
      fileName - optional name for this attachment
      binary - the content
    • createAttachment

      Attachment createAttachment(jakarta.activation.MimeType mimeType)
    • createAttachment

      Attachment createAttachment(@Nullable @Nullable String id, jakarta.activation.MimeType mimeType)
    • addAttachment

      void addAttachment(Attachment attachment)
    • removeAttachment

      boolean removeAttachment(Attachment attachment)
    • containsAttachment

      boolean containsAttachment(Attachment attachment)