Email

Sharing a file

Here are the invocation attributes you use to share a file:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.SHARE

URI

file:///path/to/file

MIME type Any valid MIME type value

Sharing an .ics file

Here are the invocation attributes you use to share an .ics file:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.SHARE

URI

file:///path/to/event.ics

MIME type text/calendar

Sharing text

Here are the invocation attributes you use to share text through an email composer:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.SHARE

MIME type

text/plain

Data Text to share as a QByteArray

Sharing multiple files

Here are the invocation attributes you use to share multiple files through an email composer:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.SHARE

URI

list://

MIME type

filelist/[subtype]

Data must be sent in JSON format, as follows:

[
   {
      "uri": "file:///path/to/file"      
   },
   ...
]

Composing an email with prepopulated fields

Here are the invocation attributes you use to compose an email with prepopulated fields using a mailto: URI:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.OPEN, bb.action.SENDEMAIL

For the URI attribute, use a standard mailto: URI and make sure that the entire URI is percent-encoded.

If you want to prepopulate the recipient field with more than one entry, use the following format:
mailto:address1@domain.com?to=address2@domain.com
If you want to prepopulate the CC, BCC, subject, and the message body fields, use the following format:
mailto:address@domain.com?cc=address2@domain.com&bcc=
address3@domain.com&subject=A%20Subject&body=That%20body

Here are the invocation attributes you use to compose an email with prepopulated fields using data in JSON format:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.COMPOSE

MIME type message/rfc822

Data should be sent in JSON format, as shown below:

{
  "to" : ["a@a.com", "b@b.net"],
  "accountid" : 1234,
  "cc" : ["foo@bar.com", "stuff@place.com"],
  "bcc" : ["foo@bar.com", "stuff@place.com"],
  "subject" : "Some punctuation. Symbol in the $ubject!!",
  "body" : "HI! Here is some more stuff.\n\n14% of emails have #1 newline or 
stuff* @ home.\n",
  "attachment" : ["file:///path/to/my/item.txt"]
}

The accountid field in the code above represents the account ID that is used as a default value for the composer card.

Replying to or forwarding an existing message

Here are the invocation attributes you use to reply to, reply to all, and forward an existing message:

Attribute Value
Target ID

sys.pim.uib.email.hybridcomposer

Action

bb.action.REPLY, bb.action.REPLYALL, bb.action.FORWARD

MIME type message/rfc822

The URI points to the message that is being replied to or being forwarded and is sent in the following format:
pim:message/rfc822:[accountID]:[messageID]

Viewing an existing message

Here are the invocation attributes you use to view an existing message:

Attribute Value
Target ID

sys.pim.uib.email.previewer

Action

bb.action.VIEW

MIME type message/rfc822

The URI points to the message that is viewed and is sent in the following format:
pim:message/rfc822:[accountID]:[messageID]

Last modified: 2014-03-10

comments powered by Disqus