Package com.swiftmq.impl.streams.comp.io
Class MailServer
- java.lang.Object
-
- com.swiftmq.impl.streams.comp.io.MailServer
-
public class MailServer extends java.lang.Object
Represents a Connection to a Mail Server.- Author:
- IIT Software GmbH, Muenster/Germany, (c) 2016, All Rights Reserved
-
-
Constructor Summary
Constructors Constructor Description MailServer(StreamContext ctx, java.lang.String host)
Internal use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this MailServer.void
collect(long interval)
Internal use.MailServer
connect()
Does the actual connect to the mail server.MailServer
disconnect()
Disconnects from the mail server.Email
email()
Returns a new Email facade to send a mail.MailServer
password(java.lang.String password)
Sets the password.MailServer
port(int port)
Sets the port (default 25 = SMTP)MailServer
username(java.lang.String username)
Sets the user name.
-
-
-
Constructor Detail
-
MailServer
public MailServer(StreamContext ctx, java.lang.String host)
Internal use.
-
-
Method Detail
-
port
public MailServer port(int port)
Sets the port (default 25 = SMTP)- Parameters:
port
- Port- Returns:
- MailServer
-
username
public MailServer username(java.lang.String username)
Sets the user name.- Parameters:
username
- User Name- Returns:
- MailServer
-
password
public MailServer password(java.lang.String password)
Sets the password.- Parameters:
password
- Password- Returns:
- MailServer
-
connect
public MailServer connect() throws java.lang.Exception
Does the actual connect to the mail server.- Returns:
- MailServer
- Throws:
java.lang.Exception
-
disconnect
public MailServer disconnect()
Disconnects from the mail server.- Returns:
- MailServer
-
email
public Email email() throws java.lang.Exception
Returns a new Email facade to send a mail.- Returns:
- Throws:
java.lang.Exception
-
collect
public void collect(long interval)
Internal use.
-
close
public void close()
Closes this MailServer.
-
-