Class ConnectionManager

java.lang.Object
  extended by ConnectionManager

public class ConnectionManager
extends java.lang.Object


Method Summary
 ThisEmail getAttachment(javax.mail.Message m)
          Method to handle messages with attachments
 ThisEmail[] getMail()
          Method to receive mails from a server
 ThisEmail getPlain(javax.mail.Message m)
          Method to handle messages without attachments
 void send(javax.mail.internet.InternetAddress to, java.lang.String subject, java.lang.String text)
          Connects to a smtp-server and creates a new mail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

send

public void send(javax.mail.internet.InternetAddress to,
                 java.lang.String subject,
                 java.lang.String text)
Connects to a smtp-server and creates a new mail

Parameters:
to - Receiver of the mail
subject - Subject of the message
text - The message, head content

getMail

public ThisEmail[] getMail()
Method to receive mails from a server

Returns:
Returns a message to the class to handle messages with or without attachments

getAttachment

public ThisEmail getAttachment(javax.mail.Message m)
Method to handle messages with attachments

Parameters:
m - The mail
Returns:
Returns a mail

getPlain

public ThisEmail getPlain(javax.mail.Message m)
Method to handle messages without attachments

Parameters:
m - The mail
Returns:
Returns a mail