org.apache.commons.jelly.tags.email
Class EmailTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.email.EmailTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class EmailTag
extends org.apache.commons.jelly.TagSupport

Basic tag for sending an email. Supports one attachment, multiple to addresses delimited by ";", multiple cc addresses, etc.

Version:
$Id: EmailTag.java 155420 2005-02-26 13:06:03Z dirkv $
Author:
Jason Horman, Willie Vu

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
EmailTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
          Execute the tag
 void setAttach(java.io.File attachment)
          Set the email attachment for the message.
 void setCC(org.apache.commons.jelly.expression.Expression cc)
          ";" seperated list of people to cc
 void setEncodeXML(boolean encodeXML)
          Sets whether we should encode the XML body as text or not.
 void setFrom(org.apache.commons.jelly.expression.Expression from)
          Set the from address for the message
 void setMessage(org.apache.commons.jelly.expression.Expression message)
          Set the message body.
 void setServer(org.apache.commons.jelly.expression.Expression server)
          Set the smtp server for the message.
 void setSubject(org.apache.commons.jelly.expression.Expression subject)
          Set the email subject
 void setTo(org.apache.commons.jelly.expression.Expression to)
          ";" seperated list of people to send to
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailTag

public EmailTag()
Method Detail

setServer

public void setServer(org.apache.commons.jelly.expression.Expression server)
Set the smtp server for the message. If not set the system property "mail.smtp.host" will be used.


setFrom

public void setFrom(org.apache.commons.jelly.expression.Expression from)
Set the from address for the message


setTo

public void setTo(org.apache.commons.jelly.expression.Expression to)
";" seperated list of people to send to


setCC

public void setCC(org.apache.commons.jelly.expression.Expression cc)
";" seperated list of people to cc


setSubject

public void setSubject(org.apache.commons.jelly.expression.Expression subject)
Set the email subject


setMessage

public void setMessage(org.apache.commons.jelly.expression.Expression message)
Set the message body. This will override the Jelly tag body


setAttach

public void setAttach(java.io.File attachment)
               throws java.io.FileNotFoundException
Set the email attachment for the message. Only 1 attachment is supported right now

Throws:
java.io.FileNotFoundException

setEncodeXML

public void setEncodeXML(boolean encodeXML)
Sets whether we should encode the XML body as text or not. The default is false so that the body will assumed to be valid XML


doTag

public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Execute the tag

Throws:
org.apache.commons.jelly.JellyTagException


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.