Show Mail Composer

NKMailComposer

Description

NKMailComposer is used to send e-mail messages without leaving the application and with the option of having content, subject and recipient pre-filled.

Usage

show()
shows modal mail composer on top of application pages, call this after you already filled all fields you need (like subject, body or recipient).

setSubject(subject)
sets mail composer subject.

setRecipient(recipients)
sets recipients as e-mail addresses, can take many addresses at once divided by comma.

setBody(body)
sets the body of the message.

addImage(image)
adds image to composed e-mail, can be called multiple times to add many pictures. Image parameter is an instance of a NKImage class.

Example

function showComposer()
{
var composer = new NKMailComposer();
composer.setRecipient("sunny@nimblekit.com, another@somewhere.com");
composer.setSubject("subject");
composer.setBody("message body!");
composer.show();
}

When the function "showComposer" is called , the composer will show with the prefilled fields as defined in the code.