Attach the file to your e-mail via mailto + invocation framework

I am tryng to attach a file to an e-mail message using the mailto syntax.

The email app is opened by the framework of the call

MailSubject = "Test"
MailBody = "Hello!";

// create handler invocation
navigator_invoke_invocation_t *invoke = NULL;
navigator_invoke_invocation_create(&invoke);

// setting the browser as target
navigator_invoke_invocation_set_target(invoke, "sys.pim.uib.email.hybridcomposer");

// set invocation action
navigator_invoke_invocation_set_action(invoke , "bb.action.OPEN, bb.action.SENDEMAIL");

// Setting URI
navigator_invoke_invocation_set_uri(invoke , ("mailto:[email protected][email protected]&subject=" + MailSubject + "&body=" + MailBody + "&attachment=" + "file:///accounts/1000/shared/print/file").toAscii().data() );

// invoke the target
navigator_invoke_invocation_send(invoke);

// clean up resources
navigator_invoke_invocation_destroy(invoke);

I tried to delete file:/// and put / alone but doesn't either.
The file is located in the shared folder and I know is the only way to attach a file to an email.

https://developer.BlackBerry.com/native/documentation/core/email.html

There are a few examples, but none of them have pre-compiled field such cc + object + body + attachments together.

Can someone help me?

Thank you

I went from Json to QVariantMap and no, it works without problem. Here is the code:

    bb::system::InvokeManager InvokeManager;
    bb::system::InvokeRequest InvokeRequest;

    QVariantMap EmailData;
    QVariantMap EmailDataWrapper;

    EmailData["to"] = "[email protected]";
    EmailData["cc"] = "[email protected]";
    EmailData["subject"] = "MailSubject";
    EmailData["body"] = "MailBody";
    EmailData["attachment"] =  "/accounts/1000/shared/print/file";

    EmailDataWrapper["data"] = EmailData;

    InvokeRequest.setTarget("sys.pim.uib.email.hybridcomposer");
    InvokeRequest.setAction("bb.action.COMPOSE");
    InvokeRequest.setMimeType("message/rfc822");
    InvokeRequest.setData(bb::PpsObject::encode(EmailDataWrapper , &bool_result) );

    InvokeManager.invoke(InvokeRequest);

Tags: BlackBerry Developers

Similar Questions

  • How to attach the file to send by mail

    I'm trying to understand how to attach a file and send it to the email from my address book

    Hi marilynp47029385,

    Please see this KB doc for the procedure to send the file as an attachment by application: sharing PDF files

    You can also directly reach email account file. Compose an email and click on the attachment icon. Then, browse to the location of the file and select the file. It will focus on your mail.

    Let us know if you encounter any problem.

    Kind regards

    Meenakshi

  • I have problems with your e-mail via a web client is sending no text in the body and sending HTML instead of text.

    I have problems with your e-mail via a web client is sending no text in the body and sending HTML instead of text.  I am told that this problem is because of the BING toolbar on my browser - is this correct?

    original title: Messaging with the BING toolbar problem

    I suggest blind carbon copy yourself e-mails coming out in the future to check for other errors and if they happen then find a new Web hosting provider.  They should have been aware of the conflicts, one would presume.

    Steve

  • Attach the file from the server to Outlook.

    Hello

    I use JDeveloper 11.1.1.3. I wonder to create an application by which I can upload files to an application server (archiving). I use the user data entry that are stored in a database that link to .pdf files. In my page, I have a table (with the selection of lines), which includes all the data. When I select a line, I can download the file by using a 'button '.

    I wonder to attach the file to an email on Microsoft Outlook. I am able to create a new message with a command and the "mailto://[email protected]?subject=Company Document" button in action. But my question is, can I pass the file for the selected line, and attach it to the email?

    Thank you

    Mohamed.

    As far as I know, outlook does not support attachments with the mailto protocol.
    means, 'attachment' is not a valid field according to the mailto URL format
    RFC (ftp://ftp.rfc-editor.org/in-notes/rfc2368.txt). You must create a mail with attachment and cannot to send it to your recipient.

    Timo

  • I have windows professional xp and when I try to attach a file to an e-mail or even see where I saved them they do not appear.

    Original title: WINZIP HELP

    I have windows professional xp and when I try to attach a file to an e-mail or even see where I saved them they do not appear.  I'm looking for all THE files, but no zipped files are there.  Help, please!

    Hello

    1. What mail client do you use?

    I suggest you to check if the files are hidden:

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/WIN_FCAB_SHOW_FILE_EXTENSIONS.mspx?mfr=true

    Also check out this link:

    http://support.Microsoft.com/kb/306531

    It will be useful.

  • Attach a file to your message? Please see

    If you attach a file to your message, you might want to consider three ways to do it.

    1.) if it is a file use image (JPEG, etc.) small "camera" icon in the toolbar above the Edit screen. This will place the image in the post, and a user can click on it to enlarge it slightly. This allows to bypass the queue.

    2.) if it is a video file, use the small icon ' Clap/slate', just above the "camera" icon This puts your file in the message, and allows you to read the file. This allows to bypass the queue.

    (3.) If you have a .txt. XML, file etc, use the "attach a file" at the bottom left of your editing window. This will put a link to that file in the post and it will queue. This is necessary because these files must pass through security.

    Read restrictions on the size of files and formats. Also read the instructions on how your file can appear, especially toward the bottom of thread.

    The locations are based on my installation of IE 7, so there may be differences with browsers.

    Hunt

    A correction, Bill. If your situation is life threatening and 911 cannot be reached in time, you can use this workaround, even if it was not this way, using the camera icon and downloading your TXT file and can be viewed immediately.

    ATTENTION: With the help of this workaround in situations threatening non-life can result in severe fines.

  • How to attach a file to an e-mail in EMOD

    People

    I can put a hiperlink to an email marketing on-demand email file.

    What my people want is to attach a file.

    Is this possible?

    Thanks in advance for your help

    Ruben Abuin

    Ruben, currently, it is not possible to attach a file to an e-mail in EMOD.

  • Firefox 19 may allow installation of software from web sites, or must there always save the files on your computer first

    Firefox 19 may allow installation of software from web sites, or must there always save the files on your computer first

    You must save the files on your computer before running them.

    In this way your security software can scan the file to see if it is safe.

  • How can I disable retention to the files on your system within the Areader? Already have downloaded files in the download folder. Enjoy your reading utility, but do not want to delete the list. I thank you, Director, actuarial Systems IBM WE

    How can I disable retention to the files on your system within the Areader? Already have downloaded files in the download folder. Enjoy your reading utility, but do not want to delete the list. I thank you, Director, actuarial Systems IBM WE

    Edit > Preferences > Documents > open settings. 'Documents in the list recently used' zero value.

  • To see the files in your repository to define Version control settings.

    I use Dreamweaver CC every day (Windows 7). Dreamweaver is updated. Today, I receive the following message if poster for all the sites that I try to work. "See the files in your repository, you must set its Version control settings."

    When I go into the settings of Version control, access is set to 'NONE' and the rest of the controls are grayed out.

    Any ideas why it would start now?

    How can I fix it.

    Ok.  Do a clean reinstall with the cleanup of CC tools.

    http://helpx.Adobe.com/Creative-Suite/KB/CS5-cleaner-tool-installation-problems.html

    Nancy O.

  • Alert message "unable to locate the file to wait for mail.

    I use Ubuntu 14.04 OS. Mozilla Thunderbird is used for the e-mail client. Everytime I open Thunderbird, I get a warning message reading 'could not locate the file spooling Mail. " What is the cure?

    Your accounts must be set up as POP or IMAP, not coil is my guess.

    Most Linux distributions include a component of mail server Thunderbird guess works. Unfortunately, the reality is very few of them are really configures. Then, go to your account settings and remove account

  • Can I attach a file to an e-mail message? It seems that I can reach only an individual file.

    I would like to a folder that contains many subfolders in it by email, but I can't attach it to the email. Is it possible to accomplsh another attatching the respective times of two of each folder?

    Thank you

    Bob Ford

    Using Windows Mail? The file zip and then it will go. (As long as the size is acceptable). Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • Make the file readable but not removable via cmd or a batch file

    Hello

    I am a windows user and I write little programs in windows using the language of batch processing. So I have a lot of work to do and set up different programs. But I am unable to set the attribute for a file that is accessible or executable but not removable. I mean I have a program and I want to set the attribute for this program unalterable, not removable. I've tried to set attribute with-s option as the attribute value of a file system and warns the user when deleting. But after you click Yes, the file is gone.

    So my question is that is it possible to set the attribute to one or more files to readable but not removable via the batch command prompt?

    Any help would be appreciated so much.

    Thanks in advance,

    Hello stephane,

    Thanks for posting your query in Microsoft Community.

    As a developer, I suggest that you re - ask your question in the MSDN forum rather than on this forum. MSDN is watched by other developers who would more than likely be able to help.
    http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues

    Hope this information is useful.

  • You can attach a file to your form

    I want to give the user the ability to attach a file when they submit their response to my form. Is this possible?

    Hi natalieg3592767,

    You use Adobe FormsCentral to design your form? If so, you can add an attachment field that would allow your respondents attach a file. Please see FormsCentral help. Create a form for more information.

    Best,

    Sara

  • LR5 is automatically applying changes to the file (exhibition, your, etc.) after registering in PS CC (2014), although I have not changed anything?

    Using a new MAC with the latest versions of the LR5 and PS. Clean install previous versions IE UN-installed and all the presets etc etc with only the color management settings the value ProRGB in the workspace of PS.

    1. Select a photo DNG in LR5. Do NOT change either. IE no exposure, tonal, no sharpening - absolutely nothing.

    2. Select Edit in Photoshop

    3 photo opens in PS and looks exactly the same as in LR5

    4. do not make ANY changes whatsoever.

    5. save the file (TIFF).

    6. close file in PS

    7. return to LR5.

    8. the saved TIFF file is there, but the exhibition, highlights, contrast, shadows, etc. have all been changed. The result is unusable.

    I tried various permutations of transfer between LR5 and Psalm for example file open in PS, saved, opening in same LR5 something occurs. The net result is that the 'evolution' takes place in the opening of the LR5 and not PS

    What has changed are the SAME values in every Photo that is passed to / PS

    The problem does not occur with JPG or TIFF to Psalm

    Also checked the file via Finder/Preview after the closing in PS and opening in LR5. The picture is OK. Open in LR5 and it is changed.

    Any help please, because this makes combo LR5/PS unusable.

    Thanks in advance.

    PS. This has only started happening with the latest versions.

    Check if you have "Apply adjustments to your car" turned on by accident in the preferences-> Presets. Also reset all of your settings default development in this same dialog box.

Maybe you are looking for

  • Java Runtime is required for browser FF work properly?

    I'm not having problems with Java on my system. I want to get rid of it for security reasons, but I don't want to influence my FF browser if it needs Java Runtime to run properly. I just want to know if deleting Java will hurt the Explorer somehow.

  • DEXT: How to manage connectivity?

    I do not have a package data unlimited. I want to update only the stuff or download something when I'm in wi - fi coverage and ask if I need to use my mobile network to make. I read through the existing posts (and everwhere else) and that you do not

  • problem of black ink HP photosmart printer

    I have a printer HP photosmart B110a and the black ink cartridge will not print. I tried replacing, switching works etc, but cannot make it work. This looks like a common problem from what I see on the forums. I'm very fed up with this problem. Can a

  • The Update Service error OR

    Hello I have a problem with the installation of updates using Update Service. I was able to download all the updates, but I'm unable to install them. I got the following error. The update version is 2.3.0.70. I tried to run as administrator and disab

  • Problem with stand-alone application

    Hello. It's my first time here in NOR. Need for support from the masters. This is the situation. Main problem: image display When I try to do a stand-alone application, the "image display" vi will not work. I'm missing DLL here? Nothing seems wrong w