Emails are generated using tags in the http://jboss.com/products/seam/mail namespace. Documents should always have the message tag at the root of the message. The message tag prepares Seam to generate an email.
The standard templating tags of facelets can be used as normal. Inside the body you can use any JSF tag which doesn't require access to external resources (stylesheets, javascript).
Root tag of a mail message
importance low, normal or high. By default normal, this sets the importance of the mail message.
precedence sets the precedence of the message (e.g. bulk).
requestReadReceipt by default false, if set, a read receipt will be request will be added, with the read receipt being sent to the From: address.
urlBase If set, the value is prepended to the requestContextPath allowing you to use components such as <h:graphicImage> in your emails.
Set's the From: address for the email. You can only have one of these per email.
name the name the email should come from.
address the email address the email should come from.
Set's the Reply-to: address for the email. You can only have one of these per email.
address the email address the email should come from.
Add a recipient to the email. Use multiple <m:to> tags for multiple recipients. This tag can be safely placed inside a repeat tag such as <ui:repeat>.
name the name of the recipient.
address the email address of the recipient.
Add a cc recipient to the email. Use multiple <m:cc> tags for multiple ccs. This tag can be safely placed inside a repeat tag such as <ui:repeat>.
name the name of the recipient.
address the email address of the recipient.
Add a bcc recipient to the email. Use multiple <m:bcc> tags for multiple bccs. This tag can be safely placed inside a repeat tag such as <ui:repeat>.
name the name of the recipient.
address the email address of the recipient.
Add a header to the email (e.g. X-Sent-From: JBoss Seam
name The name of the header to add (e.g. X-Sent-From).
value The value of the header to add (e.g. JBoss Seam).
Add an attachment to the email.
value The file to attach:
String A String is interpreted as a path to file within the classpath
java.io.File An EL expression can reference a File object
java.net.URL An EL expression can reference a URL object
java.io.InputStream An EL expression can reference an InputStream. In this case both a fileName and a contentType must be specified.
byte[] An EL expression can reference an byte[]. In this case both a fileName and a contentType must be specified.
If the value attribute is ommitted:
If this tag contains a <p:document> tag, the document described will be generated and attached to the email. A fileName should be specfied.
If this tag contains other JSF tags a HTML document will be generated from them and attached to the email. A fileName should be specfied.
fileName Specify the file name to use for the attached file.
contentType Specify the MIME type of the attached file
Set's the subject for the email.
Set's the body for the email. Supports an alternative facet which, if an HTML email is generated can contain alternative text for a mail reader which doesn't support html.
type If set to plain then a plain text email will be generated otherwise an HTML email is generated.