Invoke the E-mail with attachment

Hi guys,.

IM I invoke the email with a built-in attachment application.
I read to analyze the data in the JSON Format to the InvokationRequest, but I'm not sure how exactly to proceed.

Here's what I have so far

InvokeManager invokeManager;
InvokeRequest request;

request.setTarget("sys.pim.uib.email.hybridcomposer");
request.setAction("bb.action.COMPOSE");
request.setMimeType("message/rfc822");

QVariantMap mail;

mail.insert("to", QUrl("[email protected]"));

request.setMetadata(mail);

InvokeTargetReply *reply = invokeManager.invoke(request);

AFAIK, this should add the address [email protected] mailto-field, but it's not.

Does anyone know what im doing wrong or what is missing.

THX

Smolof

Sorry for the delay. Here is how I got it working this morning.

void InvokeEmail::sendEmail() {
    InvokeRequest request;
    request.setAction("bb.action.COMPOSE");
    request.setMimeType("message/rfc822");
    QVariantMap data;
    data["to"] = (QVariantList() << "[email protected]");
    data["subject"] = "This is a subject";

    data["body"] = "Hello there, things are great!";
    QString logpath = "/accounts/1000/shared/documents/test.pdf";
    QString logpathEncoded = QString(QUrl(logpath).toEncoded());
    qDebug() << "## LOG PATH: " + logpathEncoded;
    data["attachment"] = (QVariantList() << logpathEncoded);
    QVariantMap moreData;
    moreData["data"] = data;
    bool ok;
    request.setData(bb::PpsObject::encode(moreData, &ok));

    m_invokeManager->invoke(request);
}

 

Tags: BlackBerry Developers

Similar Questions

  • Compose the e-mail with attachment BB10 - invoke? Mailto?

    I've been digging around trying to find the 'current' best way to compose a new email to my WebWorks BBUI application.

    I want to be able to view the BB10 email compose form, fill in the subject and attach a file. Then let the user edit more before they hit send.

    I watched the 'share' example of call button, but who can't seem to do it.  In particular, if the type is not text/plain (say image / *), I don't have lots of sharing options!

    I tried blackberry.invoke.MessageArguments but that seems to be for pre-BB10.

    Citing the email directly didn't work.

    var request = {
            action: 'bb-action.SHARE',
            type: 'text/plain',
            key: 'sys.pim.uib.email.hybridcomposer',
            data: 'test',
            target_type:['APPLICATION','CARD'] };
    
        blackberry.invoke.invoke(request, function(response) {console.log('ok:' +response);}, function() {console.log('failed');});
    

    Do I have to use a mailto link?:

    If Yes, what is the best way to invoke a mailto link: leave a button in BBUI/WebWorks?  I don't want to use a link.

    Thanks for any idea here.

    You can call it through one of the wrappers webworks on the card itself. The documentation can be found here:

    - http://developer.blackberry.com/html5/apis/blackberry.invoke.card.html#.invokeEmailComposer

    You can follow the example, but I pasted here for convenience:

    blackberry.invoke.card.invokeEmailComposer({
        subject: "Email subject",
        body: "Email body",
        to: ["[email protected]", "[email protected]"],
        cc: ["[email protected], [email protected]"],
        attachment: ["/path/to/an/attachment.txt", "path/to/another/attachment.txt"]
    }, function (done) {
        console.log(done);
    }, function (cancel) {
        console.log(cancel)
    }, function (invokeError) {
        console.log(invokeError);
    });
    
  • Could not load the e-mail with attachment pictures, photos will not be open

    I can't get my pictures to open

    Have you tested with your temporary Anti Virus disabled to archive E-mail?

    You can save the attachment to your hard drive and open it from there?  You may need to check e-mail menu, or right click on the attachment. to find such an option.

    If you want to see the file extensions, go to control panel / Folder Options / View. and uncheck "hide known file types '.

  • Invoke the application mail with built-in BCC fields?

    Is this possible and if so how - because you can predefine the subject, fields of body, but I am interested in the BCC

    Hello dx22,.

    Currently, it is not supported to fill the BCC field programmatically.

    Erik Oros

    BlackBerry Development Advisor

  • How to send a mail with attachment no matter what file use the invoke in os 6.0?

    Hello

    There is some issue that how to send a mail with attachment to use the invoke method in os 6.0?

    "I use the Transport at this time mail send successfully, but I use the invoke to throw this error time these error ismail service does not support these tyes of change of parts joined the send using field or remove attachments ' so how do?

    Thank you

    Hi, rishabh

    Thanks.i got the solution and super work Super-Duper hit.

    Thnaks,

    Umang.

  • How to send a mail with attachment

    Hi friends,

    I am using soa 11.1.1.6
    Jdev 11.1.1.6
    WebLogic:-11.1.1.6

    I want generated e-mail with attachment in BPEL 11 g. Here's what I did in my bpel process

    Create processes bpel from simple Hello world.

    In the e-mail activity below details are given

    < name of scope = "Email1" >
    < bpelx:annotation >
    < bpelx:pattern = "bpelx:email" patternName > < / bpelx:pattern >
    < / bpelx:annotation >
    < variables >
    < variable name = "varNotificationReq".
    messageType = "ns1:EmailNotificationRequest" / >
    < variable name = "varNotificationResponse".
    messageType = "ns1:ArrayOfResponse" / >
    < variable name = "NotificationServiceFaultVariable".
    messageType = "ns1:NotificationServiceErrorMessage" / >
    < / variables >
    < name of sequence = sequence of '1' >
    < assign the name = "EmailParamsAssign" >
    < copy >
    < expression = "string ('Default')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload / ns1:FromAccountName" / >
    < / copy >
    < copy >
    < expression = "" string ()"/ >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload / ns1:Bcc" / >
    < / copy >
    < copy >
    < from expression = "string ('[email protected]')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload / ns1:Cc" / >
    < / copy >
    < copy >
    < expression = "" string ()"/ >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload / ns1:ReplyToAddress" / >
    < / copy >
    < copy >
    < expression = "string ('testing')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload / ns1:Subject" / >
    < / copy >
    < copy >
    < from expression = "string ('[email protected]')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: to" / >
    < / copy >
    < copy >
    < delivery > < xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > multipart/mixed < / MimeType > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MultiPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < BodyPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < BodyPartName xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < / BodyPart > < BodyPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < BodyPartName xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < / BodyPart > < / MultiPart > < / ContentBody > < / content / > < / from >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = ' / EmailPayload/ns1: Content "/ >
    < / copy >
    < copy >
    < from expression = "string (" text/html; Charset = UTF-8 ")" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [1] / ns1:MimeType" / >
    < / copy >
    < copy >
    < from expression = "" Hi"" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [1] / ns1:ContentBody" / >
    < / copy >
    < copy >
    < expression = "string (' application/xml'); "/ >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:MimeType" / >
    < / copy >
    < copy >
    < expression = "string ('result.xml')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:BodyPartName" / >
    < / copy >
    < copy >
    < expression = "bpws:getVariableData('outputVariable','payload','/client:processResponse/client:result')" / >
    < variable = part of the "varNotificationReq" = "EmailPayload."
    Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:ContentBody" / >
    < / copy >
    < / assign >
    < call name = "InvokeNotificationService".
    portType = "ns1:NotificationService."
    partnerLink = "NotificationService1."
    variableentree = "varNotificationReq".
    outputVariable = "varNotificationResponse."
    operation = "sendEmailNotification" / >
    < / sequence >
    < / scope >


    I'm able to generate E-mail with an attachment, but I do not see that the xml data in the attached file yet the file size is 64 b.

    I think I need to convert the data before sending it as an attachment. Could someone help me please by generating the XML.

    Kind regards
    Tarak

    Hi Tarak,

    You need not specify the MIME Type such as application/xml you don't read a .xml file.

    I'm assuming you are trying to send the result with its XML form variable in the attachment. So, follow the following steps to achieve the same (basically only first steps as my blog).

    -Open the e-mail from the Design view activity and go to the Attachments tab
    -Define the MIME Type such as text/plain; (no need to set as xml) and the name of the attachment as result.xml (what you do already)
    -The content to write this:

    ora:getContentAsString(bpws:getVariableData('outputVariable','payload'))
    

    ora: getContentAsString() function returns you the resulting data in its xml form.

    Be sure to check changes to the source code also like my Jdeveloper, they don't think is in Design view. Test and let me know if the problem persists.

    Kind regards
    Neeraj Sehgal

  • Cannot send mail with attachment from message reads the operation failed an object could not be found

    Unable to send an email with a photo attachment. Once all the steps to configure the e-mail was followed and press on send, the message reads 'the operation failed.  An object cannot be found.

    Hello

    Welcome to the Microsoft Answers site. Please take a look at the following address:
    http://support.Microsoft.com/kb/312354/en-us
    If only it was not fixed, so it's more probablyy caused by an Antivirus/Firewall. Symantec Antivirus seems to cause this issue often (as well as other AVs). In this case, try to disable the mailscanner in your Antivirus and see if that solves the problem. Or disable the Antivirus add-ins related via Outlook. See here how to proceed:
    http://Office.Microsoft.com/en-us/Outlook-help/enable-or-disable-add-ins-in-Office-programs-HA010034127.aspx#BM9

    I hope this helps.

  • When I try to send an e-mail with attached pictures, I am told that the photos will not appear in the e-mail message.

    When I try to send an e-mail with pictures, a pop-up window appears when I hit SEND and says that the photos will not appear in the e-mail message.  How can I fix it?

    original title: e-mail problems.

    Hello

    I suggest that ask you your question on the following link.

    http://answers.Microsoft.com/en-us/windowslive

  • SMTP E-mail with attachment file - table error

    Hi, I am trying to send an e-mail with an attached file. The file I want to include is generated by the function "write into the file of measure" with a file specified by the user to input path. When I try to connect the path to the file in VI of attachments SMTP, I get an error saying that the source is a path, but the sink is looking for a 1 d of the pathnames table. Is it possible to convert the path to the original file in a table of paths, or another method to attach the file?

    I also tried using the old "SMTP send Email with attachments" feature by converting the path of the file in a string, and takes as the path of attachment, but he also didn't work.

    Thank you!

    With the help of the tool table of generation in the tables menu should do exactly what you are looking for.

  • Mail with attachment + sendto: InvokeManager

    Anyone could find a way to invoke the email with an attachment and sendto together?

    I did a search and saw that some people were having issues with it. I just want to check if someone has found a way.

    So far, I can either use 'bb.action.SHARE' and and an attachment in uri.

    InvokeManager invokeManager;

    Application of InvokeRequest;

    request.setTarget ("sys.pim.uib.email.hybridcomposer");

    request.setAction ("bb.action.SHARE");

    request.setUri ("file:/ /...");

    invokeManager.invoke (request);

    Or use "bb.action.COMPOSE + topic/mailto etc. in uri.

    But not the two mailto and attachment.

    QString uri ("mailto:[email protected]?subject=test&attachment=file :// /...") ») ;

    The fixation part above did not work. Rest did.

    I tried to put the data() function, but it did not work

    Data of QString ('{\"to\': [------' [email protected]']}");

    request.setData (data.toUtf8 ());

    I add an option to download logs in my app and so far it seems only fair, I will be able to add attachments and let the user to add my email

    There is another thread (or more) with this question and no one has reported success.

    The last I heard, BB people were still investigating and had not reported any workaround solution.

    At this point, I guess that's something we won't until a later update of firmware or maybe the SDK, or both.

  • Create a trigger that send mail with attachment after insertion of a line in Oracle APEX

    I want to create an insert after trigger on a table that is to send a mail with an attachment. Here is my code.

    CREATE OR REPLACE TRIGGER tr_feedback

    AFTER INSERT on REVIEWS

    FOR EACH LINE

    DECLARE

    l_id NUMBER;

    BEGIN

    l_id: = APEX_MAIL. SEND)

                    p_to        => ' [email protected] ',

    P_FROM = >: NEW. E-mail

    p_subj = >: NEW. Object

    p_body = > "Please see the attachment."

    p_body_html = > ' review of < b > please < /b > the attachment ")

    APEX_MAIL. ADD_ATTACHMENT (p_mail_id = > l_id,)

    p_attachment = >: NEW. FILE,

    p_filename = >: NEW. FILE NAME,

    p_mime_type = >: NEW. MIME);

    END;

    But when I insert data, I get the following error:

    ORA-20022: Null value provided for the parameter p_filename.

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL", line 1070

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL_API", line 141

    ORA-06512: at "TR_FEEDBACK", line 11

    ORA-04088: error during execution of trigger 'TR_FEEDBACK '.

    Now, how can I fix that? Thanks in advance.

    Agree with the above.  Triggers (ab) should not be used in this way.  Nontransactional process should not be based on a transactional trigger.  These processes are part of the business logic and should be at the level of the company of codification (Summit, you can add a process to be executed once the completed insertion)

  • How to 'Submit' = send a w / hyperlink vs e-mail with attachment?

    Is it possible to make a submit button iniate:

    -an e-mail with a hyperlink to the shape (the file is stored on a network drive)

    Instead of

    -an email, including a copy of the file of the form as an attachment

    ?

    Thank you

    You can add hyperlinks to an e-mail message created in Acrobat. You can add the URL

    like plain text, though.

    In addition, the sending of an email without the file as an attachment is possible in

    Acrobat, not in the drive. Use app.mailMsg () to do this.

  • Can we have more than one attachment to the activity "email with attachment.

    Guys,

    I have a condition in which the process has n number of approvers in the stream, and each approver can add attachments to the form in the variable list < document > which transports rasthaus documents.

    At the end of the process, I'm supposed to send an email with all the files attached to a help desk team.

    I know that the activity to send an e-mail with an attachment supports one attachment. y at - it a possibility or any other activity that I can use to send an email with any number of attachments?

    Hey Ashok

    The service you want is called "send with map of attachments. This service is not on the toolbar.

    If you drag on the market to define the activity type "email" in the search box, you can see the title of the foundation that there is 3 e-mail services.

    Choose send with map of attachments.

    For help on this service, see: http://help.adobe.com/en_US/livecycle/9.0/workbenchHelp/help.htm?content=000570.html

    Diana

  • Mail with attachment

    Hi all

    I am doing a simple job and he poses problem, and hoping that you can help.

    Here's my forced.
    1. search for a file in a directory
    1A. If the file is not their nothing to treat
    2. If the file is to send them an email with the file as an attachment
    3. After you have sent the e-mail attach this file to another location.



    If the file is not IT gives them an error saying no file found and does not mail which is ok for me.

    But my problem is that even if the file is wrong with their computer. It is sending the mail without an attachment and it does not move the file to another location.


    Here are the steps that I do
    1 ODIFILEWAIT
    OdiFileWait "-ACTION = NONE" "-DIR = D:\Logs" "-MODEL = Test * .csv" "-CASESENS = NO '"-OVERWRITE = YES ""-FILECOUNT = 1 ""-TIMEOUT = 3000 ""-POLLINT = 1000 ""-HEADER = 0 ""-KEEP_FIRST_HEADER = YES ""-NOFILE_ERROR = YES "" "" ""»

    2 send an email
    "OdiSendMail"-MAILHOST = mail.mail.com ""[email protected]""-SUBJECT = Test files ""[email protected]"«-ATTACH=D:\Logs\Test*.csv."


    3. control of the OS
    Moving D:\Logs\*.csv D:\Archive


    Please let me if I do something wrong.

    K

    You use an Agent to run this package? If so, the agent must have visibility to the paths that you mentioned in the order.

    OdiSendMail can send multiple pieces attached and is case-insensitive for filenames are running in the environment Windows.

  • I need help with fusion and direct mail with attachment PDF!

    I am trying to send more than 400 emails via the mail with an attachments in PDF to Word 2013. My earlier version of Word had the MERGE feature in PDF format and when I upgraded to the word 2013, he disappeared. Can someone help me? Is it an add-on I'm supposed to be? Thanks a bunch!

    Taushadoll

    Yes, or you can downgrade (Acrobat or office)...

Maybe you are looking for

  • HP DV3 become very slow where implementation failure

    HP DV3-2105ee Windows 7 ultimate 32 bit. Since I bought this laptop new each time failed when his laptop battery performance becomes very slow start of braking, power option is to select "Balanced" if I select 'Power saver' he not become slow when ru

  • Restore my ultimate backed up the Ultimate vista basic files

    My dell inspiron 6400 which had vista Ultimate edition (updated from vista basic to ultimate with Windows vista upgrade dvd Express) have refused to start (indeed hanged). I decided to reinstall vista basic intending to upgrade with Windows pack to u

  • Samsung RV515 won't start?

    Hey,. My Samsung RV515 starts correctly. He keeps asking me to "reboot and select proper boot device or insert boot media in selected boot device and press a key. I looked and tried to fix it, but my setup for BIOS looks different. It is very simplif

  • Windows 7 Home Premium... weekly back ups fail, get the message "backup failed."

    Recently my regular weekly back ups fail to find. Everything seems to go well until maybe halfway through the procedure when the backup stops & I get message "backup failed." Unfortunately, did not keep a note of relative error code... no useful guid

  • in the face of requare book, sign in please

    I have problem with log in Trombinoscope pls solve this problem