Class SendSmtpEmail

java.lang.Object
software.xdev.brevo.model.SendSmtpEmail

public class SendSmtpEmail extends Object
SendSmtpEmail
  • Field Details

  • Constructor Details

    • SendSmtpEmail

      public SendSmtpEmail()
  • Method Details

    • sender

      public SendSmtpEmail sender(@Nullable SendSmtpEmailSender sender)
    • getSender

      @Nullable public SendSmtpEmailSender getSender()
      Get sender
      Returns:
      sender
    • setSender

      public void setSender(@Nullable SendSmtpEmailSender sender)
    • to

      public SendSmtpEmail to(@Nullable List<SendSmtpEmailToInner> to)
    • addToItem

      public SendSmtpEmail addToItem(SendSmtpEmailToInner toItem)
    • getTo

      @Nullable public List<SendSmtpEmailToInner> getTo()
      **Mandatory if messageVersions are not passed, ignored if messageVersions are passed** List of email addresses and names (_optional_) of the recipients. For example, **[{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]**
      Returns:
      to
    • setTo

      public void setTo(@Nullable List<SendSmtpEmailToInner> to)
    • bcc

      public SendSmtpEmail bcc(@Nullable List<SendSmtpEmailBccInner> bcc)
    • addBccItem

      public SendSmtpEmail addBccItem(SendSmtpEmailBccInner bccItem)
    • getBcc

      @Nullable public List<SendSmtpEmailBccInner> getBcc()
      List of email addresses and names (_optional_) of the recipients in bcc
      Returns:
      bcc
    • setBcc

      public void setBcc(@Nullable List<SendSmtpEmailBccInner> bcc)
    • cc

      public SendSmtpEmail cc(@Nullable List<SendSmtpEmailCcInner> cc)
    • addCcItem

      public SendSmtpEmail addCcItem(SendSmtpEmailCcInner ccItem)
    • getCc

      @Nullable public List<SendSmtpEmailCcInner> getCc()
      List of email addresses and names (_optional_) of the recipients in cc
      Returns:
      cc
    • setCc

      public void setCc(@Nullable List<SendSmtpEmailCcInner> cc)
    • htmlContent

      public SendSmtpEmail htmlContent(@Nullable String htmlContent)
    • getHtmlContent

      @Nullable public String getHtmlContent()
      HTML body of the message. **Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed**
      Returns:
      htmlContent
    • setHtmlContent

      public void setHtmlContent(@Nullable String htmlContent)
    • textContent

      public SendSmtpEmail textContent(@Nullable String textContent)
    • getTextContent

      @Nullable public String getTextContent()
      Plain Text body of the message. **Ignored if 'templateId' is passed**
      Returns:
      textContent
    • setTextContent

      public void setTextContent(@Nullable String textContent)
    • subject

      public SendSmtpEmail subject(@Nullable String subject)
    • getSubject

      @Nullable public String getSubject()
      Subject of the message. **Mandatory if 'templateId' is not passed**
      Returns:
      subject
    • setSubject

      public void setSubject(@Nullable String subject)
    • replyTo

      public SendSmtpEmail replyTo(@Nullable SendSmtpEmailReplyTo replyTo)
    • getReplyTo

      @Nullable public SendSmtpEmailReplyTo getReplyTo()
      Get replyTo
      Returns:
      replyTo
    • setReplyTo

      public void setReplyTo(@Nullable SendSmtpEmailReplyTo replyTo)
    • attachment

      public SendSmtpEmail attachment(@Nullable List<SendSmtpEmailAttachmentInner> attachment)
    • addAttachmentItem

      public SendSmtpEmail addAttachmentItem(SendSmtpEmailAttachmentInner attachmentItem)
    • getAttachment

      @Nullable public List<SendSmtpEmailAttachmentInner> getAttachment()
      Pass the _absolute URL_ (**no local file**) or the _base64 content_ of the attachment along with the attachment name. **Mandatory if attachment content is passed**. For example, **[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]**. Allowed extensions for attachment file: #### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm. If `templateId` is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then `attachment` is ignored
      Returns:
      attachment
    • setAttachment

      public void setAttachment(@Nullable List<SendSmtpEmailAttachmentInner> attachment)
    • headers

      public SendSmtpEmail headers(@Nullable Map<String,Object> headers)
    • putHeadersItem

      public SendSmtpEmail putHeadersItem(String key, Object headersItem)
    • getHeaders

      @Nullable public Map<String,Object> getHeaders()
      Pass the set of custom headers (_not the standard headers_) that shall be sent along the mail headers in the original email. **'sender.ip'** header can be set (**only for dedicated ip users**) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, **{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}**.
      Returns:
      headers
    • setHeaders

      public void setHeaders(@Nullable Map<String,Object> headers)
    • templateId

      public SendSmtpEmail templateId(@Nullable Long templateId)
    • getTemplateId

      @Nullable public Long getTemplateId()
      Id of the template.
      Returns:
      templateId
    • setTemplateId

      public void setTemplateId(@Nullable Long templateId)
    • params

      public SendSmtpEmail params(@Nullable Map<String,Object> params)
    • putParamsItem

      public SendSmtpEmail putParamsItem(String key, Object paramsItem)
    • getParams

      @Nullable public Map<String,Object> getParams()
      Pass the set of attributes to customize the template. For example, **{\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}**. It's **considered only if template is in New Template Language format**.
      Returns:
      params
    • setParams

      public void setParams(@Nullable Map<String,Object> params)
    • messageVersions

      public SendSmtpEmail messageVersions(@Nullable List<SendSmtpEmailMessageVersionsInner> messageVersions)
    • addMessageVersionsItem

      public SendSmtpEmail addMessageVersionsItem(SendSmtpEmailMessageVersionsInner messageVersionsItem)
    • getMessageVersions

      @Nullable public List<SendSmtpEmailMessageVersionsInner> getMessageVersions()
      You can customize and send out multiple versions of a mail. **templateId** can be customized only if global parameter contains templateId. **htmlContent and textContent** can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed **100 KB** limit and that of cumulative params shall not exceed **1000 KB**. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - **https://developers.brevo.com/docs/batch-send-transactional-emails**
      Returns:
      messageVersions
    • setMessageVersions

      public void setMessageVersions(@Nullable List<SendSmtpEmailMessageVersionsInner> messageVersions)
    • tags

      public SendSmtpEmail tags(@Nullable List<String> tags)
    • addTagsItem

      public SendSmtpEmail addTagsItem(String tagsItem)
    • getTags

      @Nullable public List<String> getTags()
      Tag your emails to find them more easily
      Returns:
      tags
    • setTags

      public void setTags(@Nullable List<String> tags)
    • scheduledAt

      public SendSmtpEmail scheduledAt(@Nullable OffsetDateTime scheduledAt)
    • getScheduledAt

      @Nullable public OffsetDateTime getScheduledAt()
      UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery.
      Returns:
      scheduledAt
    • setScheduledAt

      public void setScheduledAt(@Nullable OffsetDateTime scheduledAt)
    • batchId

      public SendSmtpEmail batchId(@Nullable String batchId)
    • getBatchId

      @Nullable public String getBatchId()
      Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end.
      Returns:
      batchId
    • setBatchId

      public void setBatchId(@Nullable String batchId)
    • preheader

      public SendSmtpEmail preheader(@Nullable String preheader)
    • getPreheader

      @Nullable public String getPreheader()
      A short summary that appears next to the subject line in the recipient’s inbox. This preview text gives recipients a quick idea of what the email is about before they open it.
      Returns:
      preheader
    • setPreheader

      public void setPreheader(@Nullable String preheader)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toUrlQueryString

      public String toUrlQueryString()
      Convert the instance into URL query string.
      Returns:
      URL query string
    • toUrlQueryString

      public String toUrlQueryString(String prefix)
      Convert the instance into URL query string.
      Parameters:
      prefix - prefix of the query string
      Returns:
      URL query string