ElegantJCharts Java API Specification v2.0

com.elegantj.net.message
Class MIMECompliantMessage

java.lang.Object
  |
  +--com.elegantj.net.message.MIMECompliantMessage
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class MIMECompliantMessage
extends java.lang.Object
implements java.io.Externalizable

This class encapsulates MIME compliant message to send using SMTPClient.

See Also:
Serialized Form

Constructor Summary
MIMECompliantMessage()
          The constructor for the default message
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 java.lang.String getAttachments()
          Method to get the attachment list of this message
 java.lang.String getBcc()
          Method to get the BCC address from the message header of this message
 java.lang.String[] getBccArray()
          Method to get the array of BCC addresses from the message header of this message
 java.lang.String getBody()
          Method to get the body of this message
 java.lang.String getCc()
          Method to get the CC address from the message header of this message
 java.lang.String[] getCcArray()
          Method to get the array of CC addresses from the message header of this message
 java.lang.String getContentLength()
          Method to get the Content-Length from the message header of this message
 java.lang.String getContentType()
          Method to get the Content-Type from the message header of this message
 java.lang.String getDate()
          Method to get the date from the message header of this message
 java.lang.String getEncoding()
          Method to get the Content-Transfer-Encoding scheme from the message header of this message
 java.lang.String getFrom()
          Method to get the FROM address from the message header of this message
 java.lang.String getHeaderFromFile(java.io.File file)
          Method which returns the message header of the message in the specified file
 java.lang.String getMessageHeader()
          Method which returns the message header of this message
 java.lang.String getMessageID()
          Method to get the Message-ID from the message header of this message
 java.lang.String getMIMEVersion()
          Method to get the MIME Version from the message header of this message
 java.lang.String getOrganization()
          Method to get the name of the Organization from the message header of this message
 java.lang.String getSendFile()
          Method to get the name of message file to be sent
 java.lang.String getSubject()
          Method to get the Subject of message from the message header of this message
 java.lang.String getTo()
          Method to get the TO address from the message header of this message
 java.lang.String[] getToArray()
          Method to get the array of TO addresses from the message header of this message
 java.lang.String getXMailer()
          Method to get the name of X-Mailer from the message header of this message
 void readExternal(java.io.ObjectInput ois)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 void saveMessageToFile(java.lang.String filePath)
          Method which saves the message to the specified file
 void saveMessageToSendFile()
          Method which saves the message to the send file This message will be saved to the send file, The file which have been specified by the
 void setAttachments(java.lang.String att)
          Method to set the attachment list of this message
 void setBcc(java.lang.String bcc)
          Method to set the BCC address in the message header of this message
 void setBody(java.lang.String b)
          Method to set the body of this message
 void setCc(java.lang.String cc)
          Method to set the CC address in the message header of this message
 void setContentLength(java.lang.String len)
          Method to set the Content-Length in the message header of this message
 void setContentType(java.lang.String ctype)
          Method to set the Content-Type in the message header of this message
 void setDate(java.lang.String date)
          Method to set the Date in the message header of this message
 void setEncoding(java.lang.String enc)
          Method to set the Content-Transfer-Encoding scheme in the message header of this message
 void setFrom(java.lang.String from)
          Method to set the FROM address in the message header of this message
 void setMessageID(java.lang.String id)
          Method to set the Message-ID in the message header of this message
 void setMIMEVersion(java.lang.String ver)
          Method to set the MIME Version in the message header of this message
 void setOrganization(java.lang.String org)
          Method to set the name of the Organization in the message header of this message
 void setSendFile(java.lang.String name)
          Method to set the name of message file to be sent
 void setSubject(java.lang.String sub)
          Method to set the Subject of message in the message header of this message
 void setTo(java.lang.String to)
          Method to set the TO address in the message header of this message
 void setXMailer(java.lang.String x)
          Method to set the name of X-Mailer in the message header of this message
 void writeExternal(java.io.ObjectOutput oos)
           
 void writeMessage(java.io.OutputStream outputStream)
           
 void writeMessage(java.io.PrintWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIMECompliantMessage

public MIMECompliantMessage()
The constructor for the default message

Method Detail

saveMessageToSendFile

public void saveMessageToSendFile()
                           throws java.lang.Exception
Method which saves the message to the send file This message will be saved to the send file, The file which have been specified by the

java.lang.Exception

saveMessageToFile

public void saveMessageToFile(java.lang.String filePath)
                       throws java.lang.Exception
Method which saves the message to the specified file

Parameters:
filePath - The specified filePath
java.lang.Exception

writeMessage

public void writeMessage(java.io.OutputStream outputStream)
                  throws java.lang.Exception
java.lang.Exception

writeMessage

public void writeMessage(java.io.PrintWriter writer)
                  throws java.lang.Exception
java.lang.Exception

getMessageHeader

public java.lang.String getMessageHeader()
Method which returns the message header of this message

Returns:
The message header of this message

getHeaderFromFile

public java.lang.String getHeaderFromFile(java.io.File file)
                                   throws java.io.IOException
Method which returns the message header of the message in the specified file

Returns:
The message header of the message containing in the 'file'
java.io.IOException

setAttachments

public void setAttachments(java.lang.String att)
Method to set the attachment list of this message

Parameters:
att - The attachment list

getAttachments

public java.lang.String getAttachments()
Method to get the attachment list of this message

Returns:
The attachment list of this message

setBody

public void setBody(java.lang.String b)
Method to set the body of this message

Parameters:
b - The body of this message

getBody

public java.lang.String getBody()
Method to get the body of this message

Returns:
The body of this message

setSendFile

public void setSendFile(java.lang.String name)
Method to set the name of message file to be sent

Parameters:
name - The name of message file to be sent

getSendFile

public java.lang.String getSendFile()
Method to get the name of message file to be sent

Returns:
The name of message file to be sent

setOrganization

public void setOrganization(java.lang.String org)
Method to set the name of the Organization in the message header of this message

Parameters:
org - The name of the organization

getOrganization

public java.lang.String getOrganization()
Method to get the name of the Organization from the message header of this message

Returns:
The name of the Organization from the message header of this message

setMIMEVersion

public void setMIMEVersion(java.lang.String ver)
Method to set the MIME Version in the message header of this message

Parameters:
ver - The MIME Version

getMIMEVersion

public java.lang.String getMIMEVersion()
Method to get the MIME Version from the message header of this message

Returns:
The MIME Version from the message header of this message

setContentLength

public void setContentLength(java.lang.String len)
Method to set the Content-Length in the message header of this message

Parameters:
len - The Content-Length

getContentLength

public java.lang.String getContentLength()
Method to get the Content-Length from the message header of this message

Returns:
The Content-Length from the message header of this message

setDate

public void setDate(java.lang.String date)
Method to set the Date in the message header of this message


getDate

public java.lang.String getDate()
Method to get the date from the message header of this message

Returns:
The date from the message header of this message

setXMailer

public void setXMailer(java.lang.String x)
Method to set the name of X-Mailer in the message header of this message

Parameters:
x - The name of the X-Mailer

getXMailer

public java.lang.String getXMailer()
Method to get the name of X-Mailer from the message header of this message

Returns:
The name of X-Mailer from the message header of this message

setEncoding

public void setEncoding(java.lang.String enc)
Method to set the Content-Transfer-Encoding scheme in the message header of this message

Parameters:
enc - The Content-Transfer-Encoding scheme

getEncoding

public java.lang.String getEncoding()
Method to get the Content-Transfer-Encoding scheme from the message header of this message

Returns:
The Content-Transfer-Encoding scheme from the message header of this message

setContentType

public void setContentType(java.lang.String ctype)
Method to set the Content-Type in the message header of this message

Parameters:
ctype - The Content-Type

getContentType

public java.lang.String getContentType()
Method to get the Content-Type from the message header of this message

Returns:
The Content-Type from the message header of this message

setMessageID

public void setMessageID(java.lang.String id)
Method to set the Message-ID in the message header of this message

Parameters:
id - The message-id

getMessageID

public java.lang.String getMessageID()
Method to get the Message-ID from the message header of this message

Returns:
The Message-ID from the message header of this message

setSubject

public void setSubject(java.lang.String sub)
Method to set the Subject of message in the message header of this message

Parameters:
sub - The subject

getSubject

public java.lang.String getSubject()
Method to get the Subject of message from the message header of this message

Returns:
The Subject of message from the message header of this message

setCc

public void setCc(java.lang.String cc)
Method to set the CC address in the message header of this message

Parameters:
cc - The CC address

getCc

public java.lang.String getCc()
Method to get the CC address from the message header of this message

Returns:
The CC address from the message header of this message

getCcArray

public java.lang.String[] getCcArray()
Method to get the array of CC addresses from the message header of this message

Returns:
The array of CC addresses from the message header of this message

setBcc

public void setBcc(java.lang.String bcc)
Method to set the BCC address in the message header of this message

Parameters:
bcc - The BCC address

getBcc

public java.lang.String getBcc()
Method to get the BCC address from the message header of this message

Returns:
The BCC address from the message header of this message

getBccArray

public java.lang.String[] getBccArray()
Method to get the array of BCC addresses from the message header of this message

Returns:
The array of BCC addresses from the message header of this message

setTo

public void setTo(java.lang.String to)
Method to set the TO address in the message header of this message

Parameters:
to - The TO address

getTo

public java.lang.String getTo()
Method to get the TO address from the message header of this message

Returns:
The TO address from the message header of this message

getToArray

public java.lang.String[] getToArray()
Method to get the array of TO addresses from the message header of this message

Returns:
The array of TO addresses from the message header of this message

setFrom

public void setFrom(java.lang.String from)
Method to set the FROM address in the message header of this message

Parameters:
from - The FROM address

getFrom

public java.lang.String getFrom()
Method to get the FROM address from the message header of this message

Returns:
The FROM address from the message header of this message

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)

writeExternal

public void writeExternal(java.io.ObjectOutput oos)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput ois)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.