agents.util
Class Email

java.lang.Object
  |
  +--agents.util.Email

public class Email
extends java.lang.Object

Class for representation of a email message.


Field Summary
protected  java.lang.String hostdest
           
protected  java.lang.String hostrem
           
protected  java.lang.String message
           
protected  java.io.StringWriter msg
           
protected  java.io.PrintWriter msgWriter
           
static int portaSMTP
           
protected  java.util.Vector recipients
           
protected  java.lang.String senderEmail
           
 
Constructor Summary
Email(java.lang.String hostdest, java.lang.String hostrem)
          Method for creating a new instance of this class.
 
Method Summary
 void addRecipient(java.lang.String email)
          Method for adding a new recipient.
 java.io.PrintWriter body()
           
 int recipientsNumber()
          Method for returning the number of reports.
 void send()
          Method for sendding the email message.
 void setMessage(java.lang.String message)
          Method for setting the email message.
 void setSender(java.lang.String email)
          Method for setting the email sender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portaSMTP

public static final int portaSMTP

hostdest

protected java.lang.String hostdest

hostrem

protected java.lang.String hostrem

senderEmail

protected java.lang.String senderEmail

msgWriter

protected java.io.PrintWriter msgWriter

msg

protected java.io.StringWriter msg

recipients

protected java.util.Vector recipients

message

protected java.lang.String message
Constructor Detail

Email

public Email(java.lang.String hostdest,
             java.lang.String hostrem)
Method for creating a new instance of this class.
Method Detail

addRecipient

public void addRecipient(java.lang.String email)
Method for adding a new recipient.

recipientsNumber

public int recipientsNumber()
Method for returning the number of reports.

setSender

public void setSender(java.lang.String email)
Method for setting the email sender.

setMessage

public void setMessage(java.lang.String message)
Method for setting the email message.

body

public java.io.PrintWriter body()

send

public void send()
          throws java.io.IOException
Method for sendding the email message.