Qore jni Module
1.2.0
|
Java wrapper for the MailMessage::Message class in Qore. More...
Public Member Methods | |
Message (QoreObject ds) | |
creates the object | |
Message (String n_sender, String n_subject) throws Throwable | |
creates a Message object from the arguments given; this variant of the constructor is designed to be used to create a Message object for sending with the SmtpClient class More... | |
Message (String msg) throws Throwable | |
creates a Message object from raw message text from a received email message More... | |
String | serialize () throws Throwable |
serializes the message to a string that can be sent to an SMTP server, for example More... | |
String[] | addTO (String recipient) throws Throwable |
add a recipient to the Message's recipient list More... | |
String[] | addCC (String recipient) throws Throwable |
add a recipient to the Message's cc list More... | |
String[] | addBCC (String recipient) throws Throwable |
add a recipient to the Message's bcc list More... | |
String | getSender () throws Throwable |
returns the sender's address in display format | |
String | getFrom () throws Throwable |
returns the sender's email address | |
String[] | getTO () throws Throwable |
returns the list of "To:" addresses | |
String[] | getCC () throws Throwable |
returns the list of "CC:" addresses | |
String[] | getBCC () throws Throwable |
returns the list of "BCC:" addresses | |
String | getSubject () throws Throwable |
returns the subject of the Message | |
String[] | getRecipients () throws Throwable |
return all the email addresses the message will be sent to, a combination of the "To:", "CC:", and "BCC:" lists | |
boolean | sendPossible () throws Throwable |
returns True if the message can be sent, False if not More... | |
void | checkSendPossible () throws Throwable |
throws a MESSAGE-ERROR exception if the Message cannot be sent More... | |
void | setBody (String n_body, String n_enc, String n_content_type) throws Throwable |
sets or replaces the Message body More... | |
void | setBody (String n_body, String n_enc) throws Throwable |
sets or replaces the Message body More... | |
void | setBody (String n_body) throws Throwable |
sets or replaces the Message body More... | |
void | setBody (byte[] n_body, String n_enc, String n_content_type) throws Throwable |
sets or replaces the Message body More... | |
void | setBody (byte[] n_body, String n_enc) throws Throwable |
sets or replaces the Message body More... | |
void | setBody (byte[] n_body) throws Throwable |
sets or replaces the Message body More... | |
void | addBody (String str) throws Throwable |
concatenates a string to the message body More... | |
void | addBody (byte[] bin) throws Throwable |
concatenates a binary object to the message body More... | |
Object | getBody () throws Throwable |
returns the Message body | |
String | getBodyTransferEncoding () throws Throwable |
returns the transfer encoding for the mssage body (see MessageEncodings for possible values) | |
void | setHeader (String hdr) throws Throwable |
sets/replaces the Message headers More... | |
void | setHeader (String[] hdrs) throws Throwable |
sets/replaces the list of Message headers from a list of header strings More... | |
void | setHeader (Map< String, String > hdrs) throws Throwable |
sets/replaces the list of Message headers from a hash of header info More... | |
void | addHeader (String hdr) throws Throwable |
adds a header to the Message More... | |
void | addHeader (String[] hdrs) throws Throwable |
adds a list of headers to the Message More... | |
void | addHeader (Map< String, String > hdrs) throws Throwable |
adds a hash of headers to the Message More... | |
String[] | getHeader () throws Throwable |
returns the current Message headers as a list of strings | |
Map< String, String > | getHeaders () throws Throwable |
returns the current Message headers as a hash | |
boolean | important () throws Throwable |
returns the current importance setting More... | |
void | important (boolean i) throws Throwable |
sets the importance setting More... | |
boolean | receiptRead () throws Throwable |
returns the current read delivery receipt setting More... | |
void | receiptRead (boolean arg) throws Throwable |
sets the read delivery receipt setting More... | |
boolean | receiptDelivery () throws Throwable |
returns the delivery receipt setting More... | |
void | receiptDelivery (boolean arg) throws Throwable |
sets the delivery receipt setting More... | |
void | attach (String name, String mime, String att, String enc, Map< String, String > hdr) throws Throwable |
creates an attachment for the Message More... | |
void | attach (String name, String mime, String att, String enc) throws Throwable |
creates an attachment for the Message More... | |
void | attach (String name, String mime, String att) throws Throwable |
creates an attachment for the Message More... | |
void | attach (String name, String mime, byte[] att, String enc, Map< String, String > hdr) throws Throwable |
creates an attachment for the Message More... | |
void | attach (String name, String mime, byte[] att, String enc) throws Throwable |
creates an attachment for the Message More... | |
void | attach (String name, String mime, byte[] att) throws Throwable |
creates an attachment for the Message More... | |
void | attach (Attachment att) throws Throwable |
adds an Attachment to the Message More... | |
Attachment[] | getAttachments () throws Throwable |
returns a list of Attachment objects for the Message | |
Part[] | getParts () throws Throwable |
returns a list of non-attachment Part objects for the Message More... | |
String | getHeaderString (String eol, boolean encode) throws Throwable |
returns a string of the message headers More... | |
String | getHeaderString (String eol) throws Throwable |
returns a string of the message headers More... | |
String | getHeaderString () throws Throwable |
returns a string of the message headers More... | |
String | toString (boolean include_body) throws Throwable |
returns a multi-line string representing the Message More... | |
String | toLine () throws Throwable |
returns a single line string summarizing the Message More... | |
Public Member Methods inherited from org.qore.jni.QoreObjectWrapper | |
QoreObjectWrapper (QoreObject obj) | |
creates the wrapper object with the Qore object | |
void | release () |
releases the Qore object; do not call any further methods on the object after this call | |
QoreObject | getQoreObject () |
returns the Qore object | |
String | className () |
returns the class name for the Qore object | |
boolean | instanceOf (String class_name) |
returns true if the object is an instance of the given class | |
Additional Inherited Members | |
Private Attributes inherited from org.qore.jni.QoreObjectWrapper | |
QoreObject | obj |
the wrapper Qore object | |
Java wrapper for the MailMessage::Message class in Qore.
|
inline |
creates a Message object from the arguments given; this variant of the constructor is designed to be used to create a Message object for sending with the SmtpClient class
Use the addTo() method to add message recipients
n_sender | the sender's email address; can be in the format "Full Display Name <name@example.com>" |
n_subject | the subject line for the email; the subject will be encoded with "Q" encoding |
MESSAGE-CONSTRUCTOR-ERROR | the sender's email address is not valid; the subject is empty |
|
inline |
creates a Message object from raw message text from a received email message
msg | the raw message text as received |
MESSAGE-PARSE-ERROR | invalid message data |
|
inline |
add a recipient to the Message's bcc list
recipient | the email address to send the message to (bcc) |
MESSAGE-ADDBCC-ERROR | the recipient's email address is invalid |
|
inline |
concatenates a binary object to the message body
bin | the binary object to concatenate to the Message body |
BODY-ERROR | cannot concatenate a binary object to a string body |
|
inline |
concatenates a string to the message body
str | the string to concatenate to the Message body |
BODY-ERROR | cannot concatenate a string to a binary body |
|
inline |
add a recipient to the Message's cc list
recipient | the email address to send the message to (cc) |
MESSAGE-ADDCC-ERROR | the recipient's email address is invalid |
|
inline |
|
inline |
|
inline |
|
inline |
add a recipient to the Message's recipient list
recipient | the email address to send the message to |
MESSAGE-ADDTO-ERROR | the recipient's email address is invalid |
|
inline |
adds an Attachment to the Message
att | the Attachment to add to the Message |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
enc | the encoding type for the message (see MessageEncodings for possible values) |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
enc | the encoding type for the message (see MessageEncodings for possible values) |
hdr | optional headers for the MIME part for the attachment |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
enc | the encoding type for the message (see MessageEncodings for possible values) |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
creates an attachment for the Message
name | the name of the attachment to be displayed in the message, normally a file name without any path |
mime | the mime type for the message |
att | the attachment itself |
enc | the encoding type for the message (see MessageEncodings for possible values) |
hdr | optional headers for the MIME part for the attachment |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
INVALID-ENCODING | the encoding given cannot be used with data given |
|
inline |
throws a MESSAGE-ERROR
exception if the Message cannot be sent
To be able to send a message, there must be at least one recipient in the "To:" or the "CC:" or the "BCC:" lists and there must be a message body
MESSAGE-ERROR | the message is incomplete and cannot be sent |
|
inline |
returns a string of the message headers
|
inline |
returns a string of the message headers
eol | the End-Of-Line marker for the string |
|
inline |
returns a string of the message headers
eol | the End-Of-Line marker for the string |
encode | encode non-ASCII values with quoted printable encoding (http://tools.ietf.org/html/rfc2047) |
|
inline |
|
inline |
returns the current importance setting
if this is True, then the following headers will be sent:
Importance:
highX-Priority
: 1Priority:
Urgent
|
inline |
sets the importance setting
if this is True, then the following headers will be sent:
Importance:
highX-Priority
: 1Priority:
Urgent
|
inline |
returns the delivery receipt setting
if this is True, then the following header will be sent:
Disposition-Notification-To
: <sender's email address>
|
inline |
sets the delivery receipt setting
if this is True, then the following header will be sent:
Disposition-Notification-To
: <sender's email address>
|
inline |
returns the current read delivery receipt setting
if this is True, then the following header will be sent:
Return-Receipt-To
: <sender's email address>
|
inline |
sets the read delivery receipt setting
if this is True, then the following header will be sent:
Return-Receipt-To
: <sender's email address>
|
inline |
returns True if the message can be sent, False if not
To be able to send a message, there must be at least one recipient in the "To:" or the "CC:" or the "BCC:" lists and there must be a message body
|
inline |
serializes the message to a string that can be sent to an SMTP server, for example
MESSAGE-ERROR | the message is incomplete and cannot be sent |
|
inline |
|
inline |
|
inline |
sets or replaces the Message body
n_body | the Message body to set |
n_enc | the encoding type for the message (see MessageEncodings for possible values) |
n_content_type | the Content-Type for the message body, if any |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
inline |
|
inline |
|
inline |
sets or replaces the Message body
n_body | the Message body to set |
n_enc | the encoding type for the message (see MessageEncodings for possible values) |
n_content_type | the Content-Type for the message body, if any |
UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
inline |
|
inline |
sets/replaces the Message headers
hdr | a single string giving a single Message header to set (replaces all message headers with the given string) |
HEADER-ERROR | no ':' separator character found in header string |
|
inline |
sets/replaces the list of Message headers from a list of header strings
hdrs | a list of Message header strings to set (replaces all message headers with the given list of strings) |
HEADER-ERROR | no ':' separator character found in header string |
|
inline |
|
inline |