Record Class Mail

java.lang.Object
java.lang.Record
io.vertigo.social.mail.Mail
Record Components:
subject - Sujet du mail;
replyTo - Addresse de retour (maybe null)
fromAddress - Addresse de l'emetteur
toAddresses - Addresses de destination
ccAddresses - Addresses en copie
textContent - Contenu text
htmlContent - Contenu html
attachments - Liste des pièces jointes

public record Mail(String subject, String replyTo, String fromAddress, List<String> toAddresses, List<String> ccAddresses, String textContent, String htmlContent, List<io.vertigo.datastore.filestore.model.VFile> attachments) extends Record
Message à envoyer par mail. Les adresses email respectent le format RFC822. Eles sont de la forme - "user@host.domain" ou - "Personal Name invalid input: '<'user@host.domain>"
Author:
npiedeloup
  • Constructor Details

    • Mail

      public Mail(String subject, String replyTo, String fromAddress, List<String> toAddresses, List<String> ccAddresses, String textContent, String htmlContent, List<io.vertigo.datastore.filestore.model.VFile> attachments)
      Creates an instance of a Mail record class.
      Parameters:
      subject - the value for the subject record component
      replyTo - the value for the replyTo record component
      fromAddress - the value for the fromAddress record component
      toAddresses - the value for the toAddresses record component
      ccAddresses - the value for the ccAddresses record component
      textContent - the value for the textContent record component
      htmlContent - the value for the htmlContent record component
      attachments - the value for the attachments record component
  • Method Details

    • builder

      public static MailBuilder builder()
      Static method factory for MailBuilder
      Returns:
      MailBuilder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • subject

      public String subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • replyTo

      public String replyTo()
      Returns the value of the replyTo record component.
      Returns:
      the value of the replyTo record component
    • fromAddress

      public String fromAddress()
      Returns the value of the fromAddress record component.
      Returns:
      the value of the fromAddress record component
    • toAddresses

      public List<String> toAddresses()
      Returns the value of the toAddresses record component.
      Returns:
      the value of the toAddresses record component
    • ccAddresses

      public List<String> ccAddresses()
      Returns the value of the ccAddresses record component.
      Returns:
      the value of the ccAddresses record component
    • textContent

      public String textContent()
      Returns the value of the textContent record component.
      Returns:
      the value of the textContent record component
    • htmlContent

      public String htmlContent()
      Returns the value of the htmlContent record component.
      Returns:
      the value of the htmlContent record component
    • attachments

      public List<io.vertigo.datastore.filestore.model.VFile> attachments()
      Returns the value of the attachments record component.
      Returns:
      the value of the attachments record component