Record Class MailpitMessage

java.lang.Object
java.lang.Record
io.micronaut.email.mailpit.client.model.MailpitMessage
Record Components:
id - Database ID.
messageId - Message ID.
from - From address.
to - To addresses.
cc - Cc addresses.
bcc - Bcc addresses.
replyTo - Reply-To addresses.
returnPath - Return-Path value.
subject - Subject.
listUnsubscribe - List-Unsubscribe summary.
date - Message date.
tags - Tags.
username - Authentication username.
text - Text body.
html - HTML body.
size - Size in bytes.
inline - Inline attachments.
attachments - Attachments.

public record MailpitMessage(@Nullable String id, @Nullable String messageId, @Nullable MailpitAddress from, @Nullable List<MailpitAddress> to, @Nullable List<MailpitAddress> cc, @Nullable List<MailpitAddress> bcc, @Nullable List<MailpitAddress> replyTo, @Nullable String returnPath, @Nullable String subject, @Nullable MailpitListUnsubscribe listUnsubscribe, @Nullable String date, @Nullable List<String> tags, @Nullable String username, @Nullable String text, @Nullable String html, long size, @Nullable List<MailpitAttachment> inline, @Nullable List<MailpitAttachment> attachments) extends Record
Mailpit message details.
Since:
3.1.0
  • Constructor Details

    • MailpitMessage

      public MailpitMessage(@Nullable String id, @Nullable String messageId, @Nullable MailpitAddress from, @Nullable List<MailpitAddress> to, @Nullable List<MailpitAddress> cc, @Nullable List<MailpitAddress> bcc, @Nullable List<MailpitAddress> replyTo, @Nullable String returnPath, @Nullable String subject, @Nullable MailpitListUnsubscribe listUnsubscribe, @Nullable String date, @Nullable List<String> tags, @Nullable String username, @Nullable String text, @Nullable String html, long size, @Nullable List<MailpitAttachment> inline, @Nullable List<MailpitAttachment> attachments)
      Creates an instance of a MailpitMessage record class.
      Parameters:
      id - the value for the id record component
      messageId - the value for the messageId record component
      from - the value for the from record component
      to - the value for the to record component
      cc - the value for the cc record component
      bcc - the value for the bcc record component
      replyTo - the value for the replyTo record component
      returnPath - the value for the returnPath record component
      subject - the value for the subject record component
      listUnsubscribe - the value for the listUnsubscribe record component
      date - the value for the date record component
      tags - the value for the tags record component
      username - the value for the username record component
      text - the value for the text record component
      html - the value for the html record component
      size - the value for the size record component
      inline - the value for the inline record component
      attachments - the value for the attachments record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • id

      public @Nullable String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • messageId

      public @Nullable String messageId()
      Returns the value of the messageId record component.
      Returns:
      the value of the messageId record component
    • from

      public @Nullable MailpitAddress from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public @Nullable List<MailpitAddress> to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • cc

      public @Nullable List<MailpitAddress> cc()
      Returns the value of the cc record component.
      Returns:
      the value of the cc record component
    • bcc

      public @Nullable List<MailpitAddress> bcc()
      Returns the value of the bcc record component.
      Returns:
      the value of the bcc record component
    • replyTo

      public @Nullable List<MailpitAddress> replyTo()
      Returns the value of the replyTo record component.
      Returns:
      the value of the replyTo record component
    • returnPath

      public @Nullable String returnPath()
      Returns the value of the returnPath record component.
      Returns:
      the value of the returnPath record component
    • subject

      public @Nullable String subject()
      Returns the value of the subject record component.
      Returns:
      the value of the subject record component
    • listUnsubscribe

      public @Nullable MailpitListUnsubscribe listUnsubscribe()
      Returns the value of the listUnsubscribe record component.
      Returns:
      the value of the listUnsubscribe record component
    • date

      public @Nullable String date()
      Returns the value of the date record component.
      Returns:
      the value of the date record component
    • tags

      public @Nullable List<String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • username

      public @Nullable String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • text

      public @Nullable String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • html

      public @Nullable String html()
      Returns the value of the html record component.
      Returns:
      the value of the html record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • inline

      public @Nullable List<MailpitAttachment> inline()
      Returns the value of the inline record component.
      Returns:
      the value of the inline record component
    • attachments

      public @Nullable List<MailpitAttachment> attachments()
      Returns the value of the attachments record component.
      Returns:
      the value of the attachments record component