Class EmailModelBuilder

java.lang.Object
io.meeds.portal.mail.model.EmailModelBuilder

public final class EmailModelBuilder extends Object
Builds an EmailModel: what an email says, apart from how it looks
  • Method Details

    • lang

      public EmailModelBuilder lang(String lang)
      The language of the reader, as a BCP 47 tag; it sets the lang of the document
    • title

      public EmailModelBuilder title(String title)
      The headline, shown in the header band, and the subject of the document
    • preheader

      public EmailModelBuilder preheader(String preheader)
      The preview a mail client shows next to the subject
    • paragraph

      public EmailModelBuilder paragraph(String paragraph)
      A paragraph of the message, in plain text
    • trustedHtml

      public EmailModelBuilder trustedHtml(String trustedHtml)
      HTML the caller has already sanitized; inserted as is after the paragraphs
    • fact

      public EmailModelBuilder fact(String label, String value)
      A value the reader may need to keep, such as a login, set apart from the text
    • lead

      public EmailModelBuilder lead(String lead)
      The sentence that introduces the button
    • button

      public EmailModelBuilder button(String label, String link)
      The action of the email; the link must be http, https or mailto
    • note

      public EmailModelBuilder note(String note)
      A short remark under the button, such as how long the link lasts
    • signoff

      public EmailModelBuilder signoff(String signoff)
      The closing words; a blank line starts a new paragraph
    • aside

      public EmailModelBuilder aside(String aside)
      A last remark in small print, after the closing words
    • fallbackLabel

      public EmailModelBuilder fallbackLabel(String fallbackLabel)
      The sentence that introduces the plain address shown under the button
    • build

      public EmailModel build()