Class EMailSender


public class EMailSender extends Object
SMTP E-Mail sender service
Michael Scholz, Matteo Caruso - LogicalDOC
  • Field Details

  • Constructor Details

    • EMailSender

      public EMailSender(long tenant)
    • EMailSender

      public EMailSender(String tenant)
    • EMailSender

      public EMailSender()
  • Method Details

    • setTenant

      public void setTenant(long tenant)
    • getSender

      public String getSender()
    • setSender

      public void setSender(String sender)
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • sendAsync

      public void sendAsync(EMail email, String templateName, Map<String,Object> dictionary)
      Same as send(EMail, String, Map) but executes in another thread
      email - the email to send
      templateName - the template to use to render the body of the message using the automation engine
      dictionary - map of variable to pass to the automation
    • send

      public void send(EMail email, String templateName, Map<String,Object> dictionary) throws javax.mail.MessagingException
      Sends an email by using a given template
      email - The email to send
      templateName - Name of the template to be applied
      dictionary - The dictionary to be used in the template
      javax.mail.MessagingException - raised if the email cannot be sent
    • sendAsync

      public void sendAsync(EMail email)
      Same as send(EMail) but executes in another thread
      email - the email to send
    • send

      public void send(EMail email) throws javax.mail.MessagingException
      This method sends an email using the smtp-protocol. The email can be a simple mail or a multipart mail containing up to 5 attachments.
      email - E-Mail which should be sent.
      javax.mail.MessagingException - raised if the email cannot be sent
    • isAuthEncrypted

      public boolean isAuthEncrypted()
    • setAuthEncrypted

      public void setAuthEncrypted(boolean authEncrypted)
    • getConnectionSecurity

      public int getConnectionSecurity()
    • setConnectionSecurity

      public void setConnectionSecurity(int connectionSecurity)
    • getFoldering

      public int getFoldering()
    • setFoldering

      public void setFoldering(int foldering)
    • getFolderId

      public Long getFolderId()
    • setFolderId

      public void setFolderId(Long folderId)