Mail with multiple attachments

I try to call Email with attached several files.

Using this link https://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/email.html my code variations:

InvokeRequest InvokesHelper::mailRequest2(QList fileNames)
{
    InvokeRequest request;
    QVariantMap data;
    QVariantMap moreData;
    QVariantList attachments;

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

    for (int i = 0; i < fileNames.count(); i++)
    {
        attachments.append(QString(QUrl("file://" + fileNames[i]).toEncoded()));
    }

    data["attachment"] = attachments;
    moreData["data"] = data;

    bool ok;
    request.setData(bb::PpsObject::encode(moreData, &ok));

// this way not works too

//    bb::data::JsonDataAccess jda;
//    QByteArray jsonBuffer;
//    jda.saveToBuffer(moreData, &jsonBuffer);
//    request.setData(jsonBuffer);

    return request;
}

Or another variant:

   InvokeRequest request;
    request.setTarget("sys.pim.uib.email.hybridcomposer");
    request.setAction("bb.action.SHARE");
    request.setMimeType("filelist/mixed");
    request.setUri("list://");

    QVariantList files;

    for (int i = 0; i < fileNames.count(); i++)
    {
        QVariantMap fileItem;
        fileItem["uri"] = QString("file://") + fileNames[i];
        files.append(fileItem);
    }

    QVariantMap moreData;
    moreData["data"] = files;

    bool ok;
    request.setData(bb::PpsObject::encode(moreData, &ok));

    return request;

But nothing works... Can someone help me?

Today, I went back to this issue and found the solution. Labour Code:

InvokeRequest InvokesHelper::mailFilesRequest(QList fileNames)
{
    QString dataString = "[";
    for (int i = 0; i < fileNames.count(); i++)
    {
        dataString += "{\"uri\": \"file://" + fileNames[i] + "\"}";

        if (i < fileNames.count() - 1)
        {
            dataString +=",";
        }
    }
    dataString +="]";

    InvokeRequest request;
    request.setTarget("sys.pim.uib.email.hybridcomposer");
    request.setAction("bb.action.SHARE");
    request.setUri("list://");
    request.setData(dataString.toUtf8());
    request.setMimeType("filelist/mixed");

    return request;
}

BUT THE MAIN PROBLEM WAS:

We cannot invoke share several files from temp dir, but all the shared work very well with dir and it subfolders. It is very curious to me, there is no line on this subject in docs...

But I hope that this post will be useful for someone

Tags: BlackBerry Developers

Similar Questions

  • Sending Email with multiple attachments using packages

    Hi all

    Version: 10.2.0

    I am trying to send mail with multiple attachments using packages.

    I tried to use Mail_tools which is in http://www.myoracleportal.com/

    But I can send with only one attachment. Are there other options which i it allows to send with multiple attachments.

    I have bad do I send attachments Jasper instance < < converted to bytes > >.

    Please advice...

    TIA,

    My dear friend,

    If you are looking for in this forum - you can get it.

    Have you checked the forum?

    Anyway,.

    Here's the starter for you->

    http://forums.Oracle.com/forums/search.jspa?threadID=&q=sending+email+with+multiple+attachments+using+packages++&objid=F75&DateRange=last90days&NumResults=15

    Kind regards.

    LOULOU.

  • Email with multiple attachments using ADF Mobile

    Hello

    I want to send multiple attachments using ADF Mobile, using Jdeveloper version 11.1.2.3.0

    looking at the signature of the method below sendEmail(), attachments param looks as String

    DeviceManagerFactory.getDeviceManager (.sendEmail)
    java.lang.String to
    java.lang.String cc
    java.lang.String subject
    java.lang.String body
    java.lang.String bcc
    spare java.lang.String
    java.lang.String mimeTypes)

    Is multiple attachments supported in the ADF Mobile? If so, please suggest how to achieve this scenario.

    -Deepak

    Deepak,

    You can attach multiple files as string separated by commas (paths).

    Ex: http://technology.amis.nl/2012/12/27/adf-mobile-device-interaction-api-pictures-gps-and-email-with-attachments/

    Ref: http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/amxbinding.htm

    Arun-

  • Windows Live Mail with multiple users

    Windows Live Mail can cause more than one user to download emails with privacy by using a PC?

    Please wait until a moderator move this thread on the forum Windows Live Mail because it has nothing to do with Windows security, privacy, and user accounts, which is the title of this forum.

    Thanks for your patience, RobinKD.

  • Send an email with multiple attachments

    Hi all

    Thanks for any help in advance.

    I'm writing a procedure that will seek mutiple selected documents that are saved in a report. The part I'm having the problem is how to pass only the documents that have been selected by the box for the procedure. I have the document with instructions on how to add multiple documents to a table, but not when selected in a checkbox control.

    Thanks again for any help.

    With this application in mind, a process page on submit the following should do the trick:

    DECLARE
         v_apex_id NUMBER;
         v_blob BLOB;
         v_filename varchar2(50);
         v_mimetype varchar2(50);
    BEGIN
    
         v_apex_id := APEX_MAIL(
                        p_to       => '[email protected]',   -- change to your email address
                        p_from     => '[email protected]', -- change to a real senders email address
                        p_body     => 'message body',
                        p_subj     => 'Attach images and send');
    
         for i in 1..APEX_APPLICATION.g_f02.COUNT LOOP
    
              select filename, mimetype, content into v_filename, v_mimetype, v_blob
              from emp_ecm_documents
              where id = apex_application.g_f02(i);
    
              APEX_MAIL.ADD_ATTACHMENT(
                   p_mail_id    => v_apex_id,
                   p_attachment => v_blob,
                   p_filename   => v_filename,
                   p_mime_type  => v_mimetype);
    
         END LOOP;
    
         APEX_MAIL.PUSH_QUEUE;
    
    END;
    

    API is used:

    APEX_MAIL: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_mail.htm#CIHDIEJI
    APEX_APPLICATION: http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_app.htm#insertedID2

    Van
    Trent

  • Windows Live mail problem when sending an email with picture multiple attachments (.jpg)

    Last week, I sent an email with attachments of two photo. This was not enough and I got 5 separate messages, advising me of non-delivery, but also the original message had not been saved in my "sent" folder

    Today, I sent two e-mails with multiple attachments photos and the recipient received the first email 46 times but with only the subject line, no message and no attachments. He received the second e-mail 26 times again with only the subject line (this one not included in my folder "sent" Although previous email did).

    The recipient today is different from the one I sent last week.

    All other messages recently, including those with no photographic attachments seem to have been given normally and are displayed in my "sent" folder Some recipients responded to these so I know they arrived OK.

    Any ideas on what is causing the problem and how to solve this problem?

    Right click on the name of the account above the Inbox. Properties | Advanced and uncheck 'Break apart messages... ". ». That will solve the multiple copies with no photo.

  • 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)...

  • Transfer e mails with attachments

    When I receive e-mails with attachments - users of Microsoft - if I send them on - yet once users to Microsoft, they are either impossible to open the attachment or he's not here to open!

    So I've only had my mac for a year I am still finding my way round

    El Capitan is my operating system

    To include attachments to a forwarded message, please select from the menu bar of Mail

    Change attachments ▹ ▹ include original attachments in response

    Also select

    Change attachments ▹ ▹ always send the attachments in the Windows environment

  • How to pass a string of e-mail with attachments?

    How to pass a string of e-mail with attachments? I received an email and had answers in both directions. I try now to send the original of the attachments on the first 2 emails. How do I do that? My receiptiant says that he gets the e-mail message but has no attachments?

    You don't mention what you use for e-mail.
     
    You can either transfer the messages all attachments, or save attachments and then attach them to a new message.
  • I can't receive e-mails with attachments - what is happening with this?

    For some reason, I can't receive e-mails with attachments.  Can someone give me a help?  I use Windows Mail and McAfee total protection.  I checked passwords, amil servers, file size blocks, etc.  Nothing has worked.

    Bruce - I thank you for your help - sitting mail as spam on the ISP server, so I changed the settings.  UGH!  Was not wrong, and now it works fine!  You are kind and helpful, and I thank you for your advice.

  • I have an e mail with quite a large amount of attachments, sitting in the Outbox in Windows Mail. In my view, that attachments are at the origin of the problem.

    I have an e mail with quite a large amount of attachments, sitting in the Outbox in WINDOWS MAIL. In my view, that attachments are at the origin of the problem. As soon as I open the mailbox the arrow in bottom corner shows right 'sending mail '. It just continually seeks to send it, so I can not receive or send other emails. I tried to delete this mail in the Outbox by highlighting and click 'delete', but nothing happens. I have a desktop Compaq Presario SR 5633 WM

    original title: sending mail windows problem

    Verifier check first to work offline , and then delete the Outbox.

  • Windows live mail error - failed to send e-mails with attachments

    This is the error message I get

    An unknown error has occurred.

    "Object ' subject.xlsx [1/2]"
    Server error: 554
    Server response: 554 5.6.1 Messages of type message / partial are not supported
    Server: 'smtp.outlook.com '.
    Windows Live Mail error ID: 0x800CCC6F
    Protocol: SMTP
    Port: 587
    Secure (SSL): Yes

    I have disabled mail scanning in norton antivirus - I don't have any other anti-virus software.
    I increased the length of the server timeout.
    Neither helped.

    Send email without an attachment without problem.

    Any help is appreciated!

    Hi Vineeth,

    Thank you for your response. I've since found the cause and I am now able to send e-mails with attachments new!
    It's to do with the message is divided into parts - so nothing to do with Norton, fortunately.

    Mary

  • error in sending mails with attachments

    Hai friends, windows mail works fine for me, but I still have problem sending mail with attachments.

    When we send an attachment then windows Messaging mail tell our mail sending successfully, but it is stored in the Outbox & mail does not reach the destination. can we have the solution to this.

    Hi Sammy Anderson,

    Thanks for joining us out on the Microsoft Community forums.

    According to the description, you are experiencing problems sending mails with attachments. Please answer a few questions to refine the question.

    1. are you using Windows Live Mail to send and receive messages or are you referring to the mail application?

    2. do you get an error message?

    3. are you aware of changes to the computer before the show?

    If you are Windows Mail app, you can consult this article and also run the app troubleshooting utility that is provided in the notes.

    What to do if you have problems with a soft

    http://Windows.Microsoft.com/is-is/Windows-8/what-troubleshoot-problems-app

    If the problem is with Windows Live Mail, you can post the question in another Department for assistance.

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

    Hope this information helps. Get back to us if you have more queries about Windows.

  • Sending mail with an attachment using UTL_SMTP

    Hi all

    I'm working on a PL/SQL code, where do I send a mail with an attachment using UTL_SMTP. I use the following code, I changed the value of p_to and p_from

    DECLARE

    l_mail_conn UTL_SMTP.connection;

    l_boundary VARCHAR2 (50): = '-= * #abc1234321cba #* =';

    l_step PLS_INTEGER: = 12000; -Make sure you define a multiple of 3 would not exceed the 24573

    p_to VARCHAR2 (100): = ' [email protected] ';

    p_from VARCHAR2 (100): = ' [email protected] ';

    p_subject VARCHAR2 (100): = "UPLOAD of FILE MAIL."

    p_text_msg VARCHAR2 (100): = 'it is a system generated email';

    p_attach_name VARCHAR2 (100);

    p_attach_mime VARCHAR2 (100);

    p_attach_blob BLOB;

    p_smtp_host VARCHAR2 (100): = 'localhost ';

    p_smtp_port NUMBER: = 25;

    BEGIN

    l_mail_conn: = UTL_SMTP.open_connection (p_smtp_host, p_smtp_port);

    UTL_SMTP. HELO (l_mail_conn, p_smtp_host);

    UTL_SMTP.mail (l_mail_conn, p_from);

    UTL_SMTP. RCPT (l_mail_conn, p_to);

    UTL_SMTP.open_data (l_mail_conn);

    UTL_SMTP.write_data (l_mail_conn, ' Date: ' |) TO_CHAR (SYSDATE, ' ' DD-MON-YYYY HH24:MI:SS) | UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' from: ' | p_to |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' from: ' | p_from |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' subject: ' | p_subject |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' Reply-To: ' | p_from |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, "MIME-Version: 1.0 ' |") UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' Content-Type: multipart/mixed; limit = "" | ") l_boundary | '"' || UTL_TCP. CRLF. UTL_TCP. CRLF);

    IF p_text_msg IS NOT NULL THEN

    UTL_SMTP.write_data (l_mail_conn, '-' | l_boundary |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' Content-Type: text/plain; charset = "iso-8859-1" ' |) UTL_TCP. CRLF. UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, p_text_msg);

    UTL_SMTP.write_data (l_mail_conn, UTL_TCP.crlf |) UTL_TCP. CRLF);

    END IF;

    IF p_attach_name IS NOT NULL THEN

    FOR I IN (SELECT *)

    OF xx_mail_test_table

    WHERE ROWNUM = 1

    ORDER BY last_update_date DESC) LOOP

    UTL_SMTP.write_data (l_mail_conn, '-' | l_boundary |) UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' Content-Type: ' | p_attach_mime |) '; name =' ' | I.FILE_NAME | '"' || UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, "Content-Transfer-Encoding: base64' |") UTL_TCP. CRLF);

    UTL_SMTP.write_data (l_mail_conn, ' Content-Disposition: attachment; filename = "" | ") I.FILE_NAME | '"' || UTL_TCP. CRLF. UTL_TCP. CRLF);

    FOR J FROM 0... TRUNC ((DBMS_LOB. GetLength (I.file_name) - 1) / l_step) LOOP

    UTL_SMTP.write_data (l_mail_conn, UTL_RAW.cast_to_varchar2 (UTL_ENCODE.base64_encode (DBMS_LOB.substr (I.FILE_NAME, l_step, J * l_step + 1)));)

    END LOOP;

    UTL_SMTP.write_data (l_mail_conn, UTL_TCP.crlf |) UTL_TCP. CRLF);

    END LOOP;

    END IF;

    UTL_SMTP.write_data (l_mail_conn, '-' | l_boundary |) '--' || UTL_TCP. CRLF);

    UTL_SMTP.close_data (l_mail_conn);

    UTL_SMTP. Quit (l_mail_conn);

    EXCEPTION

    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN

    UTL_SMTP. Quit (l_mail_conn);

    lift;

    WHILE OTHERS THEN

    dbms_output.put_line (SQLERRM);

    END;

    This is when I execute the block that I get 2 mails to the same but there are some attachments, I checked the table and he gave.

    Could someone help me as to where I'm wrong?

    Create the raw DATA for the SMTP protocol can be tricky.

    I cheat and use a package that has been designed to do easily.

    APEX_MAIL

    MK

  • 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.

Maybe you are looking for