Hi i want to know that is there any activity from where i can fill the email activity and start it from my program.. like this...
To populate a subject, cc, bcc and/or body, simply append this information onto the mailto url:
data: {
type : "mail",
url: "mailto:[email protected]?subject=this%20is%20a%20test&[email protected]",
}
Regarding how to include an attachment, that depends on which version of Firefox OS you want your app to be compatible with.
As of Firefox OS 1.2, you can simply add blobs
and filenames
objects to the data object:
data: {
type : "mail",
url: "mailto:[email protected]?subject=this%20is%20a%20test&[email protected]",
blobs: [testBlob],
filenames: ['test.html']
}
I've updated the Firefox OS Boilerplate app to include a working example of this. The related bits of Firefox OS code can be found in apps/email/js/app_messages.js and apps/email/js/mail_app.js.
Prior to Firefox 1.2, the new
(mail) activity does not accept these parameters and you'll need to use the share
activity:
var sharingImage = new MozActivity({
name: "share",
data: {
type: "image/*",
number: 1,
blobs: [blob]
}
});
The Firefox OS Boilerplate includes a working example of the share activity.
The relevant code showing that attachments are limited to the share activity in version 1.1 is in apps/email/js/mail-app.js.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With