|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
helma.scripting.rhino.extensions.MailObject
public class MailObject
A JavaScript wrapper around a JavaMail message class to send mail via SMTP from Helma
Field Summary | |
---|---|
static int |
BCC
|
static int |
CC
|
static int |
FROM
|
static int |
MIMEPART
|
static int |
OK
|
static int |
REPLYTO
|
static int |
SEND
|
static int |
SUBJECT
|
static int |
TEXT
|
static int |
TO
|
Fields inherited from class org.mozilla.javascript.ScriptableObject |
---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface org.mozilla.javascript.Scriptable |
---|
NOT_FOUND |
Method Summary | |
---|---|
void |
addBCC(java.lang.String addstr,
java.lang.Object name)
Add a BCC address for this message |
void |
addCC(java.lang.String addstr,
java.lang.Object name)
ADd a CC address for this message |
void |
addPart(java.lang.Object obj,
java.lang.Object filename)
Add a MIME message part to a multipart message |
void |
addText(java.lang.String text)
Add some text to a plain text message. |
void |
addTo(java.lang.String addstr,
java.lang.Object name)
Add a To address for this message |
java.lang.String |
getClassName()
Overrides abstract method in ScriptableObject |
java.lang.String |
getMultipartType()
Returns the MIME multipart message subtype. |
protected javax.mail.Session |
getSession()
Get the cached JavaMail session. |
int |
getStatus()
Returns the error status of this message. |
static void |
init(org.mozilla.javascript.Scriptable scope,
java.util.Properties props)
Initialize Mail extension for the given scope, called by RhinoCore. |
static MailObject |
mailObjCtor(org.mozilla.javascript.Context cx,
java.lang.Object[] args,
org.mozilla.javascript.Function ctorObj,
boolean inNewExpr)
JavaScript constructor, called by the Rhino runtime. |
void |
send()
Send the message. |
void |
setFrom(java.lang.String addstr,
java.lang.Object name)
Set the From address for this message |
void |
setMultipartType(java.lang.String subtype)
Sets the MIME multipart message subtype. |
void |
setReplyTo(java.lang.String addstr)
Set the Reply-to address for this message |
protected void |
setStatus(int status)
Set the error status of this message |
void |
setSubject(java.lang.Object subject)
Set the subject of this message |
void |
setText(java.lang.String text)
Set the text to a plain text message, clearing any previous text. |
void |
setTo(java.lang.String addstr,
java.lang.Object name)
Set the To address for this message |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
---|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OK
public static final int SUBJECT
public static final int TEXT
public static final int MIMEPART
public static final int TO
public static final int CC
public static final int BCC
public static final int FROM
public static final int REPLYTO
public static final int SEND
Method Detail |
---|
public java.lang.String getClassName()
getClassName
in interface org.mozilla.javascript.Scriptable
getClassName
in class org.mozilla.javascript.ScriptableObject
protected javax.mail.Session getSession()
public static MailObject mailObjCtor(org.mozilla.javascript.Context cx, java.lang.Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
public static void init(org.mozilla.javascript.Scriptable scope, java.util.Properties props)
protected void setStatus(int status)
status
- the new error statuspublic int getStatus()
public void addText(java.lang.String text)
public void setText(java.lang.String text)
public java.lang.String getMultipartType()
public void setMultipartType(java.lang.String subtype)
subtype
- the MIME subtype such as "mixed" or "alternative".public void addPart(java.lang.Object obj, java.lang.Object filename)
obj
- the MIME part object. Supported classes are java.lang.String,
java.io.File and helma.util.MimePart.filename
- optional file name for the mime partpublic void setSubject(java.lang.Object subject)
subject
- the message subjectpublic void setReplyTo(java.lang.String addstr)
addstr
- the email address to set in the Reply-to headerpublic void setFrom(java.lang.String addstr, java.lang.Object name)
addstr
- the email address to set in the From headername
- the name this address belongs topublic void setTo(java.lang.String addstr, java.lang.Object name)
addstr
- the email address to set in the To headername
- the name this address belongs topublic void addTo(java.lang.String addstr, java.lang.Object name)
addstr
- the email address to set in the To headername
- the name this address belongs topublic void addCC(java.lang.String addstr, java.lang.Object name)
addstr
- the email address to set in the CC headername
- the name this address belongs topublic void addBCC(java.lang.String addstr, java.lang.Object name)
addstr
- the email address to set in the BCC headername
- the name this address belongs topublic void send()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |