|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--webtester.packages.common.alertHandler
This class handles sending email notifications when testcases, or the application, fails.
Field Summary | |
private java.lang.String |
sAttachment
Any HTML attachments to be sent with the message. |
private java.lang.String |
sFromAddress
The from address used when sending the message. |
private java.lang.String |
sMailServer
The mailserver used for sending messages. |
private java.lang.String |
sMessage
The message body. |
private java.lang.String |
sRecipients
The recipient list for the message. |
private java.lang.String |
sSubject
The subject of the message. |
Constructor Summary | |
alertHandler(java.lang.String sServer,
java.lang.String sRecips,
java.lang.String sFromAddr)
Takes the mail server and recipient addresses as arguments. |
Method Summary | |
void |
addAttachment(java.lang.String sHTMLAttach)
Adds the text as an HTML attachment to the message. |
int |
sendImageAlertMessage()
Sends the message for an image. |
int |
sendMessage()
Sends the message. |
void |
setMessageText(java.lang.String sMsg)
Sets the body of the message that will be sent. |
void |
setSubject(java.lang.String sSubj)
Sets the subject of the message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String sMailServer
private java.lang.String sRecipients
private java.lang.String sFromAddress
private java.lang.String sMessage
private java.lang.String sAttachment
private java.lang.String sSubject
Constructor Detail |
public alertHandler(java.lang.String sServer, java.lang.String sRecips, java.lang.String sFromAddr)
sServer
- the mailserver to usesRecips
- a comma-delimited list of recipientssFromAddr
- the from address to be added to the messageMethod Detail |
public void setMessageText(java.lang.String sMsg)
sMsg
- a String containing the message bodypublic void setSubject(java.lang.String sSubj)
sSubj
- a String containing the message subjectpublic void addAttachment(java.lang.String sHTMLAttach)
sHTMLAttach
- a String containing the HTML attachment.public int sendMessage()
public int sendImageAlertMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |