Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 7
Registered: ‎06-29-2013
My Device: z10
My Carrier: FloatingLand

Js code,send an email in cascade

Could someone post codes of sending an email in cascade qml using javascript?

 

When we using js ,do we need to import something in the begining of an qml file?

 

Thanks a lot!!

Highlighted
Developer
Posts: 24
Registered: ‎10-31-2012
My Device: Dev Alpha B
My Carrier: COMPE

Re: Js code,send an email in cascade

To send an email you need to call an invocation and pass the parameters.

 

https://developer.blackberry.com/cascades/documentation/device_platform/invocation/email.html

 

ex:

Button{
   onClicked{
      sendEmail.trigger("bb.action.SENDEMAIL")
   }
}
attachedObjects: [
   Invocation {
      id: sendEmail
      query {
      invokeTargetId: "sys.pim.uib.email.hybridcomposer"
      invokeActionId: "bb.action.SENDEMAIL"
      uri: "mailto:myemail@google.com?subject=Feedback about myAPP"
      }
   }
]

 

__
Helped you? Like me.