|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.TagSupport | +--javax.servlet.jsp.tagext.BodyTagSupport | +--org.apache.taglibs.mailer.MailTag
MailTag - JSP tag Mail is used to construct an email message.
Field Summary | |
protected static int |
BCC_ADDRESS
|
protected static java.lang.String |
BCC_ADDRESS_STRING
|
protected static int |
CC_ADDRESS
|
protected static java.lang.String |
CC_ADDRESS_STRING
|
protected static int |
TO_ADDRESS
The address type int constants |
protected static java.lang.String |
TO_ADDRESS_STRING
The address type string constants |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
MailTag()
|
Method Summary | |
protected void |
addBcc(java.lang.String value)
add a bcc address to the list of bcc addresses for this email |
protected void |
addCc(java.lang.String value)
set a cc address to the list of cc addresses for this email |
protected void |
addTo(java.lang.String value)
add a to address to the list of to addresses for this email |
int |
doEndTag()
implementation of method from the Tag interface that tells the JSP what to do upon encountering the end tag for this tag set |
int |
doStartTag()
implementation of method from the Tag interface that tells the JSP what to do upon encountering the start tag for this tag set |
boolean |
getAttachments()
get the attachments flat |
java.lang.String |
getBcc()
get the bcc address/addresses for this email |
java.lang.String |
getBody()
get the message for this email |
java.util.ArrayList |
getBodyParts()
get the list of attachments |
java.lang.String |
getCc()
get the cc address/addresses for this email |
java.lang.String |
getFrom()
get the from address for this email |
java.util.ArrayList |
getHeaderName()
get the list names of extra headers to be set |
java.util.ArrayList |
getHeaderValue()
get the list of values of extra headers to be set |
javax.mail.internet.MimeMessage |
getMessage()
get the whole email message |
java.lang.String |
getReplyTo()
get the Reply-to address for this email |
javax.mail.Session |
getSessionObj()
get the jndi named session to be used to find the mail session |
java.lang.String |
getSubject()
get the subject for this email |
java.lang.String |
getTo()
get the to address for this email |
java.lang.String |
getType()
get the mime type for this email text or html |
protected void |
resetBcc(java.lang.String value)
reset the bcc address to a single email address |
protected void |
resetCc(java.lang.String value)
reset the cc address to a single email address |
protected void |
resetFrom(java.lang.String value)
reset the from address for this email |
protected void |
resetReplyTo(java.lang.String value)
reset the replyto address for this email |
protected void |
resetServer(java.lang.String value)
reset the SMTP server hostname |
protected void |
resetSubject(java.lang.String value)
reset the email subject |
protected void |
resetTo(java.lang.String value)
reset the to address to a single email address |
void |
setAuthenticate(java.lang.String value)
set authentication flag |
void |
setBcc(java.lang.String value)
set the bcc address/addresses for this email |
void |
setBodyParts(javax.mail.internet.MimeBodyPart mbp)
set attachments into an arraylist |
void |
setCc(java.lang.String value)
set the cc address/addresses for this email |
void |
setError(boolean value)
set true if error has occured |
void |
setFrom(java.lang.String value)
set the from address for this email |
protected void |
setHeader(java.lang.String name,
java.lang.String value)
set the name and value of any extra headers to be sent |
void |
setMessage(java.lang.String value)
set the message for this email |
void |
setMimeMessage(java.lang.String value)
set the jndi named session to be used to find the mail session |
void |
setPassword(java.lang.String value)
set the password for basic smtp authentication |
void |
setReplyTo(java.lang.String value)
set the Reply-to address for this email |
void |
setServer(java.lang.String value)
set the server to be used to find the mail session if one is not provided |
void |
setSession(java.lang.String value)
set the jndi named session to be used to find the mail session |
void |
setSubject(java.lang.String value)
set the subject for this email |
void |
setTo(java.lang.String value)
set the to address for this email |
void |
setType(java.lang.String value)
set the mime type for this email text or html |
void |
setUser(java.lang.String value)
set the login user name for basic smtp authentication |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
Field Detail |
protected static final java.lang.String TO_ADDRESS_STRING
protected static final java.lang.String CC_ADDRESS_STRING
protected static final java.lang.String BCC_ADDRESS_STRING
protected static final int TO_ADDRESS
protected static final int CC_ADDRESS
protected static final int BCC_ADDRESS
Constructor Detail |
public MailTag()
Method Detail |
public final int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- thrown when error occurs in processing the body of
this methodpublic final int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- thrown when error occurs in processing the body of
this methodpublic final javax.mail.internet.MimeMessage getMessage() throws javax.servlet.jsp.JspException
public final java.util.ArrayList getBodyParts()
public final boolean getAttachments()
public final java.lang.String getTo()
public final java.lang.String getReplyTo()
public final java.lang.String getFrom()
public final java.lang.String getCc()
public final java.lang.String getBcc()
public final java.lang.String getSubject()
public final java.util.ArrayList getHeaderName()
public final java.util.ArrayList getHeaderValue()
public final java.lang.String getBody()
public final javax.mail.Session getSessionObj()
public final java.lang.String getType()
public final void setError(boolean value)
value
- value that determines if an error has occuredpublic final void setTo(java.lang.String value)
value
- string that is the address to whom this mail is to be sentpublic final void setReplyTo(java.lang.String value)
value
- string that is the address to whom this mail is to be sentpublic final void setFrom(java.lang.String value)
value
- string that is the address from whom this mail is to be sentpublic final void setCc(java.lang.String value)
value
- string that is the list of carbon copy addresses to recieve
this emailpublic final void setBcc(java.lang.String value)
value
- string that is the list of blind carbon copy addresses to
recieve this emailpublic final void setSubject(java.lang.String value)
value
- string that is the subject of this emailprotected final void setHeader(java.lang.String name, java.lang.String value)
name
- string that is the name of an extra header to be sentvalue
- string that is the value of an extra header to be sentpublic final void setMessage(java.lang.String value)
value
- string that is the subject of this emailpublic final void setBodyParts(javax.mail.internet.MimeBodyPart mbp)
mbp
- mimebodypart to be attached to the e-mailpublic final void setUser(java.lang.String value)
value
- login namepublic final void setPassword(java.lang.String value)
value
- Plain text password for authenticationpublic final void setServer(java.lang.String value)
value
- string that is the server used to find the mail sessionpublic final void setMimeMessage(java.lang.String value)
value
- string that is the jndi named sessionpublic final void setSession(java.lang.String value)
value
- string that is the jndi named sessionpublic final void setAuthenticate(java.lang.String value)
value
- boolean value that marks if an authenticator object should
be used in the creation of the session so that user
authentication can be performedpublic final void setType(java.lang.String value)
value
- string that is the mime type for this emailprotected final void addTo(java.lang.String value)
value
- string that is an address to whom this mail is to be sentprotected final void addCc(java.lang.String value)
value
- string that is a cc address to be added to the list of cc
addresses for this emailprotected final void addBcc(java.lang.String value)
value
- string that is a bcc address to be added to the list of bcc
addresses for this emailprotected final void resetTo(java.lang.String value)
value
- string that is an address to whom this mail is to be sentprotected final void resetCc(java.lang.String value)
value
- string that is a cc address to be used for this emailprotected final void resetBcc(java.lang.String value)
value
- string that is a bcc address to be used for this emailprotected final void resetFrom(java.lang.String value)
value
- string that is the address from whom this mail is to be sentprotected final void resetReplyTo(java.lang.String value)
value
- string that is the address for email reply toprotected final void resetSubject(java.lang.String value)
value
- string that is the email subjectprotected final void resetServer(java.lang.String value)
value
- string that is SMTP server hostname
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |