Class MailServer

java.lang.Object
com.swiftmq.impl.streams.comp.io.MailServer

public class MailServer extends Object
Represents a Connection to a Mail Server.
Author:
IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
  • Constructor Details

  • Method Details

    • port

      public MailServer port(int port)
      Sets the port (default 25 = SMTP)
      Parameters:
      port - Port
      Returns:
      MailServer
    • username

      public MailServer username(String username)
      Sets the user name.
      Parameters:
      username - User Name
      Returns:
      MailServer
    • password

      public MailServer password(String password)
      Sets the password.
      Parameters:
      password - Password
      Returns:
      MailServer
    • connect

      public MailServer connect() throws Exception
      Does the actual connect to the mail server.
      Returns:
      MailServer
      Throws:
      Exception
    • disconnect

      public MailServer disconnect()
      Disconnects from the mail server.
      Returns:
      MailServer
    • email

      public Email email() throws Exception
      Returns a new Email facade to send a mail.
      Returns:
      Email
      Throws:
      Exception
    • collect

      public void collect(long interval)
      Internal use.
    • close

      public void close()
      Closes this MailServer.