compose
int
compose
(
msg
)
This method opens a compose tab. Every field is optional. The "body" field
accepts both plain text and HTML. If it's HTML, the
HTML content is processed by a Web service to avoid XSS vulnerabilities.
Sample Use:
As used by the "Hello World" sample application.
html flag should be set to true.
HTML content is processed by a Web service to avoid XSS vulnerabilities.
Sample Use:
As used by the "Hello World" sample application.
...
Compose an email to joe:
<input id="msgbody">
<button onclick="openmail.Mail.compose({to: 'joe@joe.joe', subject: 'hi joe',
body: document.getElementById('msgbody').value})">
Compose
</button>
...
- Parameters:
-
msg <Object>Optional object used to pre-populate the new message.
msgmay include the following:
to: StringA comma-separated list of valid email addresses
subject: StringAn email subject
body: StringA plain-text or HTML email body
cc: StringA comma-separated list of valid email addresses
bcc: StringA comma-separated list of valid email addresses
html: booleanSet to true if the body is HTML, false if the body is plain text
- Returns:
int - An error code.
refreshApplications
int
refreshApplications
(
)
Requests the mail container to refetch the list of applications
and redraw the application folders.
- Returns:
int - An error code.
search
int
search
(
query
)
This method is the strict equivalent of having the user type the query in the search
box, then pressing "go". The search will open in a new tab.
Sample Use:
As used by the "Saved Searches" sample application.
Sample Use:
As used by the "Saved Searches" sample application.
var state = [
{label:"Sample 1", query:"test"},
{label:"Sample 2", query:"openmail"}
];
function buttonClick(btn)
{
var a = btn.id.split("_");
var action=a[0], index=a[1];
switch (action)
{
case "run":
openmail.Mail.search(state[index].query);
break;
...
- Parameters:
-
query < Object >
queryincludes the following member:-
query: StringThe query to execute (Required)
- Returns:
int - An error code.
