java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.newmediaworks.taglib.email.EmailTag
- All Implemented Interfaces:
PartTag
,Serializable
,BodyTag
,IterationTag
,JspTag
,Tag
,TryCatchFinally
Formats an email then sends the message or stores in an attribute. The message is constructed through nested tags.
- Author:
- New Media Works
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ScopeEE.Request.Attribute
<String> The request attribute that stores the error message.static final String
Deprecated, for removal: This API element is subject to removal in a future version.static final String
Deprecated, for removal: This API element is subject to removal in a future version.Please useERROR_REQUEST_ATTRIBUTE
instead.static final String
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_BUFFERED, EVAL_BODY_TAG
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addToAddress
(String to) Adds a to address.void
int
doEndTag()
void
int
void
setContent
(Object o, String type) void
setContent
(Multipart content) void
void
setFileName
(String filename) void
Sets the from address.void
void
void
setSmtpHost
(String smtpHost) void
setSmtpPort
(Integer smtpPort) void
setSubject
(String subject, String charset) Sets the subject.void
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 Details
-
TAG_NAME
- See Also:
-
ERROR_REQUEST_ATTRIBUTE_NAME
Deprecated, for removal: This API element is subject to removal in a future version.Please useERROR_REQUEST_ATTRIBUTE
instead.The request attribute name that stores the error message. -
ERROR_REQUEST_ATTRIBUTE
The request attribute that stores the error message. -
ERROR_REQUEST_PARAMETER_NAME
Deprecated, for removal: This API element is subject to removal in a future version.Please useERROR_REQUEST_ATTRIBUTE
instead.The request attribute name that stores the error message.
-
-
Constructor Details
-
EmailTag
public EmailTag()
-
-
Method Details
-
setSmtpHost
-
setSmtpPort
-
setVar
-
setScope
-
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classBodyTagSupport
- Throws:
JspException
-
addToAddress
Adds a to address.- Throws:
MessagingException
-
setFrom
Sets the from address.- Throws:
MessagingException
-
setSubject
Sets the subject.- Throws:
MessagingException
-
addHeader
- Specified by:
addHeader
in interfacePartTag
- Throws:
MessagingException
-
setHeader
- Specified by:
setHeader
in interfacePartTag
- Throws:
MessagingException
-
setContent
- Specified by:
setContent
in interfacePartTag
- Throws:
MessagingException
-
setContent
- Specified by:
setContent
in interfacePartTag
- Throws:
MessagingException
-
setDataHandler
- Specified by:
setDataHandler
in interfacePartTag
- Throws:
MessagingException
-
setFileName
- Specified by:
setFileName
in interfacePartTag
- Throws:
MessagingException
-
doEndTag
- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classBodyTagSupport
- Throws:
JspException
-
doCatch
- Specified by:
doCatch
in interfaceTryCatchFinally
- Throws:
Throwable
-
doFinally
public void doFinally()- Specified by:
doFinally
in interfaceTryCatchFinally
-
ERROR_REQUEST_ATTRIBUTE
instead.