Class NuclosMail

java.lang.Object
org.nuclos.api.mail.NuclosMail

public class NuclosMail extends Object
class representing an email-object org.nuclos.api.provider.MailProvider
Author:
Matthias Reichart
  • Field Details

  • Constructor Details

    • NuclosMail

      public NuclosMail()
    • NuclosMail

      public NuclosMail(String sRecipient, String sSubject)
  • Method Details

    • setFrom

      public void setFrom(String pNameAuthor)
      sets the name of the sender
      Parameters:
      pNameAuthor -
    • getFrom

      public String getFrom()
      returns the name of the sender
      Returns:
    • setContentType

      public void setContentType(NuclosMailContentType encoding)
      Use this method to set the mail type of the current NuclosMail.
      For NuclosMailContentType use NuclosMail constant values.
      Parameters:
      encoding -
    • addRecipient

      public void addRecipient(String emailRecipient)
      adds a new recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)
      Parameters:
      emailRecipient -
    • getRecipients

      public List<String> getRecipients()
      returns a list of all recipients
      Returns:
    • addRecipientCC

      public void addRecipientCC(String emailRecipientCC)
      adds a new CC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)
      Parameters:
      emailRecipientCC -
    • getRecipientsCC

      public List<String> getRecipientsCC()
      returns a list of all recipientsCC
      Returns:
    • addRecipientBCC

      public void addRecipientBCC(String emailRecipientBCC)
      adds a new BBC recipient; the given string value will be checked if there is more then one recipient mentioned (semicolon separated)
      Parameters:
      emailRecipientBCC -
    • getRecipientsBCC

      public List<String> getRecipientsBCC()
      returns a list of all recipientsBCC
      Returns:
    • setSubject

      public void setSubject(String pEmailsubject)
      sets the subject of the email
      Parameters:
      pEmailsubject -
    • setMessage

      public void setMessage(String pEmailMessage)
      sets the message text of the email
      Parameters:
      pEmailMessage -
    • setReplyTo

      public void setReplyTo(String pEmailReplyTo)
      sets the reply address of the email
      Parameters:
      pEmailReplyTo -
    • addAttachment

      public void addAttachment(NuclosFile pFileToAttach)
      attaches a NuclosFile to the email
      Parameters:
      pFileToAttach -
    • addInlineAttachment

      public void addInlineAttachment(NuclosFile pFileToAttach)
      Attaches a NuclosFile representing an inline attachment (e.g. an embedded image) to the email.
      Parameters:
      pFileToAttach -
    • setHeader

      public void setHeader(String pProperty, String pValue)
      adds an entry to the header object of the email
      Parameters:
      pProperty - - key
      pValue - - value
    • getSubject

      public String getSubject()
      returns the subject of the email
      Returns:
    • getMessage

      public String getMessage()
      returns the message text of the email
      Returns:
    • getReplyTo

      public String getReplyTo()
      returns the reply address of the email
      Returns:
    • getAttachments

      public Collection<NuclosFile> getAttachments()
      returns a collection of all attached NuclosFiles
      Returns:
    • getInlineAttachments

      public Collection<NuclosFile> getInlineAttachments()
      Returns a collection of all attached NuclosFiles representing inline attachments (e.g. embedded images).
      Returns:
    • getHeaders

      public Map<String,String> getHeaders()
      returns a map with all header information
      Returns:
    • getMailType

      public String getMailType()
      returns the mail type, e.g. text/html or text/plain
      Returns:
    • getMailCharset

      public String getMailCharset()
      returns the mail charset, e.g. UTF-8
      Returns:
    • getReceivedDate

      public Date getReceivedDate()
      Gets the date this mail was received by the server.
      Returns:
    • setReceivedDate

      public void setReceivedDate(Date receivedDate)
      Sets the date this mail was received by the server.
    • getSentDate

      public Date getSentDate()
      Gets the date this mail was sent.
      Returns:
    • setSentDate

      public void setSentDate(Date sentDate)
      Sets the date this mail was sent.