| java.lang.Object org.openharmonise.commons.net.Email
Email | public class Email extends Object (Code) | | A convenience class to simplify the process of sending an email using
the JavaMail API.
version: $Revision: 1.2 $ |
Method Summary | |
public void | SetContentType(String content_type) This method will change the content type. | public void | SetEmailAddress(String new_email_address) This method will change the email Address of where the message is GOING. | public boolean | send() This method will send all of the email details specified earlier
when the email object was constructed. | public void | setImportance(String sImportance) Sets the importance heading of the email. | public String | testSend() Debug method which will build a description of steps executed during
the emailing process. |
CTYPE_HTML | final public static String CTYPE_HTML(Code) | | HTML mime type
|
CTYPE_TXTPLAIN | final public static String CTYPE_TXTPLAIN(Code) | | Plain text mime type
|
HEADER_IMPORTANCE | final protected static String HEADER_IMPORTANCE(Code) | | Email importance header
|
IMPORTANCE_HIGH | final public static String IMPORTANCE_HIGH(Code) | | Email importance header value of 'high'
|
from_address | protected String from_address(Code) | | Email 'from' address
|
m_fAttachment | protected File m_fAttachment(Code) | | Attachment file.
|
m_sImportance | protected String m_sImportance(Code) | | Importance header value
|
m_sMailhost | protected String m_sMailhost(Code) | | Mail host for email.
|
message_contenttype | protected String message_contenttype(Code) | | Email message mime type.
|
message_text | protected String message_text(Code) | | Email message text
|
subject_text | protected String subject_text(Code) | | Email subject text
|
to_address | protected String to_address(Code) | | Email 'to' address
|
Email | public Email(String mailhost, String to_address, String from_address, String subject_text, String message_text)(Code) | | The constructor allows you to create an email object. The object is then filled with all the information about the email, ie sender, reciever, subject and the actual message.
The Email constructor does NOT send the message until the send method is called.
Parameters: mailhost - - the mailhost to be used for email Parameters: to_address - - The email address of the RECIEVER , example: Mellon@yahoo.com Parameters: from_address - - The email address of the SENDER , example: Orange@hotmail.com Parameters: subject_text - - What the subject of the message is about Parameters: message_text - - The actual content of the message |
Email | public Email(String mailhost, String to_address, String from_address, String subject_text, String message_text, File attachment) throws Exception(Code) | | The constructor allows you to create an email object. The object is then filled with all the information about the email, ie sender, reciever, subject and the actual message.
The Email constructor does NOT send the message until the send method is called.
Parameters: mailhost - - the mailhost to be used for email Parameters: to_address - - The email address of the RECIEVER , example: Mellon@yahoo.com Parameters: from_address - - The email address of the SENDER , example: Orange@hotmail.com Parameters: subject_text - - What the subject of the message is about Parameters: message_text - - The actual content of the message |
SetContentType | public void SetContentType(String content_type)(Code) | | This method will change the content type.
|
SetEmailAddress | public void SetEmailAddress(String new_email_address)(Code) | | This method will change the email Address of where the message is GOING.
ie to who the message is being SENT.
Parameters: new_email_address - the address of where the email is going : example mellon2@yahoo.com |
send | public boolean send()(Code) | | This method will send all of the email details specified earlier
when the email object was constructed.
boolean - to say whether the msg was sent, or not. |
setImportance | public void setImportance(String sImportance)(Code) | | Sets the importance heading of the email.
Parameters: sImportance - |
testSend | public String testSend()(Code) | | Debug method which will build a description of steps executed during
the emailing process.
description of process |
|
|