I found one example in the the git hub for BB 10 for sending an email, but it looks pretty complicated and alot done in C.
does anyone have an example on how to send a quick email using QML. I don't need any buttons or text fields, just hard coded values.
I found this simple snip, but dont' know how to integrate it.
https://developer.blackberry.com/cascades/documentation/device_platform/pim/messages.html
Any help would be appreciated.
Following code will open a sheet with email composer having all the specified email fields prepopulated:
import bb.cascades 1.0
Page {
Container {
horizontalAlignment: HorizontalAlignment.Fill
layout: DockLayout {
}
Container {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
TextArea {
id: emailBody
}
Button {
text: "Send email"
onClicked: {
emailInvocation.query.uri = "mailto:[email protected]?subject=Test&body=" + emailBody.text
emailInvocation.query.updateQuery();
}
}
}
}
attachedObjects: [
Invocation {
id: emailInvocation
query.mimeType: "text/plain"
query.invokeTargetId: "sys.pim.uib.email.hybridcomposer"
query.invokeActionId: "bb.action.SENDEMAIL"
onArmed: {
emailInvocation.trigger(emailInvocation.query.invokeActionId);
}
}
]
}
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