![]() |
Qore jni Module 2.4.0
|
Java wrapper for the MailMessage::Message class in Qore. More...
Inherits QoreObjectWrapper.
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 | |
| Message (String msg) throws Throwable | |
| creates a Message object from raw message text from a received email message | |
| String | serialize () throws Throwable |
| serializes the message to a string that can be sent to an SMTP server, for example | |
| String[] | addTO (String recipient) throws Throwable |
| add a recipient to the Message's recipient list | |
| String[] | addCC (String recipient) throws Throwable |
| add a recipient to the Message's cc list | |
| String[] | addBCC (String recipient) throws Throwable |
| add a recipient to the Message's bcc list | |
| 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 | |
| void | checkSendPossible () throws Throwable |
throws a MESSAGE-ERROR exception if the Message cannot be sent | |
| void | setBody (String n_body, String n_enc, String n_content_type) throws Throwable |
| sets or replaces the Message body | |
| void | setBody (String n_body, String n_enc) throws Throwable |
| sets or replaces the Message body | |
| void | setBody (String n_body) throws Throwable |
| sets or replaces the Message body | |
| void | setBody (byte[] n_body, String n_enc, String n_content_type) throws Throwable |
| sets or replaces the Message body | |
| void | setBody (byte[] n_body, String n_enc) throws Throwable |
| sets or replaces the Message body | |
| void | setBody (byte[] n_body) throws Throwable |
| sets or replaces the Message body | |
| void | addBody (String str) throws Throwable |
| concatenates a string to the message body | |
| void | addBody (byte[] bin) throws Throwable |
| concatenates a binary object to the message body | |
| 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 | |
| void | setHeader (String[] hdrs) throws Throwable |
| sets/replaces the list of Message headers from a list of header strings | |
| void | setHeader (Map< String, String > hdrs) throws Throwable |
| sets/replaces the list of Message headers from a hash of header info | |
| void | addHeader (String hdr) throws Throwable |
| adds a header to the Message | |
| void | addHeader (String[] hdrs) throws Throwable |
| adds a list of headers to the Message | |
| void | addHeader (Map< String, String > hdrs) throws Throwable |
| adds a hash of headers to the Message | |
| 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 | |
| void | important (boolean i) throws Throwable |
| sets the importance setting | |
| boolean | receiptRead () throws Throwable |
| returns the current read delivery receipt setting | |
| void | receiptRead (boolean arg) throws Throwable |
| sets the read delivery receipt setting | |
| boolean | receiptDelivery () throws Throwable |
| returns the delivery receipt setting | |
| void | receiptDelivery (boolean arg) throws Throwable |
| sets the delivery receipt setting | |
| void | attach (String name, String mime, String att, String enc, Map< String, String > hdr) throws Throwable |
| creates an attachment for the Message | |
| void | attach (String name, String mime, String att, String enc) throws Throwable |
| creates an attachment for the Message | |
| void | attach (String name, String mime, String att) throws Throwable |
| creates an attachment for the Message | |
| void | attach (String name, String mime, byte[] att, String enc, Map< String, String > hdr) throws Throwable |
| creates an attachment for the Message | |
| void | attach (String name, String mime, byte[] att, String enc) throws Throwable |
| creates an attachment for the Message | |
| void | attach (String name, String mime, byte[] att) throws Throwable |
| creates an attachment for the Message | |
| void | attach (Attachment att) throws Throwable |
| adds an Attachment to the Message | |
| 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 | |
| String | getHeaderString (String eol, boolean encode) throws Throwable |
| returns a string of the message headers | |
| String | getHeaderString (String eol) throws Throwable |
| returns a string of the message headers | |
| String | getHeaderString () throws Throwable |
| returns a string of the message headers | |
| String | toString (boolean include_body) throws Throwable |
| returns a multi-line string representing the Message | |
| String | toLine () throws Throwable |
| returns a single line string summarizing the Message | |
Java wrapper for the MailMessage::Message class in Qore.
import qoremod.MailMessage.Message;
|
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 |
adds a hash of headers to the Message
| hdrs | a hash of headers to add to the Message |
|
inline |
adds a header to the Message
| hdr | a header to add to the Message |
|
inline |
adds a list of headers to the Message
| hdrs | a list of headers to add to the Message |
|
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 |
returns a list of non-attachment Part objects for the Message
these could represent alternative representations of the message body, for example
|
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 |
sets or replaces the Message body
| n_body | the Message body to set |
| UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
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) |
| UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
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 |
sets or replaces the Message body
| n_body | the Message body to set |
| UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
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) |
| UNKNOWN-ENCODING | the message encoding value passed is unknown/unimplemented |
|
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 |
sets/replaces the list of Message headers from a hash of header info
| hdrs | a hash of Message headers to set (replaces all message headers with the given hash) |
|
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 |
returns a single line string summarizing the Message
|
inline |
returns a multi-line string representing the Message
| include_body | if True the Message body will be included in the string output |