Download the attachment to Email

I want to get an image received as an attachment in an email, but I can't seem to understand the correct way to do it.

When an e-mail is received I can get the attachment in an object of attachment, but the way some points to

/ Accounts/1000/pimdata/messages/1419773287/2/4/4374/att-itiqa1

What should I do from here to turn it into a JPEG somewhere on the system so I can access it.

I sent the e-mail, also in the code using

builder->body(MessageBody::Html, bodyData);
QString contentId = "image" + QString::number(0) + "@b.sky.com";
QVariantMap metaData;
metaData["Content-ID"] = "<" + contentId + ">";
Attachment attachment = Attachment("image/jpeg", QFileInfo(fname).fileName(), QUrl::fromLocalFile(fname.remove("file:///")), metaData);
builder->addAttachment(attachment);

Any help appreciated.

I solved this problem using MessageService to retrieve the attachments() which gives me FileAttachment instead, and the FileAttachment fullPath() gives the correct path for my image.

Tags: BlackBerry Developers

Similar Questions

  • AppleScript to choose a message in mail &amp; download the attachment

    Hello

    I would like to know if there is a way to prompt the user to choose a message like how we are able to choose file / folder?

    Above all, I would like the process to go as:

    Choose a mail, download his attachment, perform actions on the attachment.

    I'm stuck at how I can refer to a message as well to download the attachment. ATM, I'm only able to get the message ID in already by selecting the message in Mail and making "set my_Sel to get the selection."

    Thank you.

    It might be possible, but heavy, at best.

    It would be much easier to create a user screen the message in question and then call the script, but if you want to go the other way you may:

    (a) a list of all messages in the mailbox

    (b) to present the user with a list of posts by choose in the list

    (c) affect the result

    What is your opposition to act on the selection?

  • can not download the attachment for hotmail

    Can not download the attachment for hotmail. The "uploading...". "sign never finished. But attachment downloading works in Internet Explorer. I tried to disable, uninstall and reinstall silverlight, but none of them seems to fix the problem.

    You have a user agent which is corrupt and which identifies you as undefined GoogleToolbarBB

    See:

  • Need help to download the attachment from mail Client

    Hello

    I am trying to download the attachment from the mail using AttachmentDownloadManager API. For that I am currently using the code below:

    public class MailMinder extends UiApplication {
    
    public static void main(String args[]) {
        MailMinder theApp = null;
            try {
                theApp = new MailMinder();
            } catch (Exception e) {
                Dialog.alert("Exception e = " + e.toString());
            } finally {
                theApp.enterEventDispatcher();
            }
        }
    
        private MailMinder() {
    
            AttachmentDownloadManager adm = new AttachmentDownloadManager();
            adm.download(bodypart, null, new DownloadProgressListener() {          // Not able to get the Bodypart object here
    
                                public void downloadCancelled(Object element) {
    
                                }
    
                                public void downloadCompleted(Object element) {
                                    //Here i am doing the parsing of the attachment
                                }
    
                                public void updateProgress(Object element, int current, int total) {
    
                                }
    
        }
    }
    

    As you can see, this API download() method is required the Bodypart object I get using the subject line of the Mail or of the Open Message.
    But I'm not able to get the object of the open message I tried using MessageListener and FolderListener API. And when I open a Message in the Messages Application, I must add a Menuitem.

    Can someone help me to get the Open Message of the Message object and add the Menuitem?

    Note: I don't want to use the Attachment Manager API as it's require the xirimdevice prefix in the name of the attachment.

    Hi Mark. I am able to fix this with a different approach. Please check in my blog: BlogforMobile

    Thanks a lot again for your support.

  • Can not download the attached PDF to mail on the iPhone 6

    Can not download the attached PDF to mail on the iPhone 6

    Hi mati19,

    Could you go look in section "Open of Mail" from the FAQ document to see if it answers your question?

    How to open PDF documents in Adobe Acrobat DC for iOS (iPhone version)

    Please let us know if you have any additional questions.

  • can download the attachment, but cannot send using firefox

    When I try to send an attachment bar with the paper clip bing etc does not work. pointer does nothing when trying to click on attach. Can I download an attachment but not send. Itried deletion of silverlight but not my laptop difference use Kaspersky

    Hello

    I suggest using Internet Explorer and check to see if you encounter the same problem.

    If the problem is only with Firefox so I suggest you post your question on the link provided below for assistance.

    http://www.Mozilla.org/about/forums/#end-user-support

  • Were there difficulties downloading documents attached to emails and attachments?

    I have problems to download the documents and attachments.  In addition, failed to open. PDF files while online that were sent to me.  Is it possible to solve these problems?

    Hi Donald,.

    1. you use any (Outlook, Windows Mail) mail client or web browser to access the emails?

    2. what browser you use to access the emails?

    3. who is the provider of mail service?

    4. doesn't this problem occurs with a particular e-mail account or with all the e-mail account?

    5. you receive an error message when you try to open the attachments?

    You can follow the steps in the below links for problems with opening the .pdf online file.

    http://kb2.Adobe.com/CPS/836/cpsid_83688.html

    http://kb2.Adobe.com/CPS/328/328233.html

    Hope it will be useful.

  • Change the name of the attachment to email

    Hello

    When a form is sent by e-mail, how can I change the name of the file that is attached?

    Thank you

    MDawn

    The attachment will take the name of the shape that is attached. If you rename the file you want, then it will take this name.

    Paul

  • Cloud Creative Suite download the verification HELP Email!

    I have the CC Suite on a different computer. I am trying to download it on another. Once downloaded, it sends a notice of audit to a completely different email that my Adobe account. How can I change where my verification email is sent?

    Meagan, please try to disconnect from the creative cloud and reconnect to it cheaply from Adobe.

    Solution 2: clean the connection of the cached user information.

    Note: Please close cloud creative before executing Solution 2

  • Hide or disable the attach to email/file sharing

    HI - is it possible to disable or remove these for each user? We use Adobe Reader X, I read some articles that you use a JavaScript but those I found does not work with this version. Don't look like they can be removed either by using the register and same AppSense cannot block the two out. The reason for this is that it sometimes blocks Outlook to the point where you have to kill it in Task Manager.

    Disable the sharing feature by setting bEnableShareFile to 0.

    I don't know how to disable the function of an email attachment.

    HTH,

    Ben

  • could not download the attached file

    Hello

    I am facing a problem everything to attach a file to a task. I managed to attach a file, but when I try to download, I failed. I went to the attachments, and then I click on the name of the file. then appears a window that has two buttons (download and okay). When I click on the download button, nothing happens. could someone help?

    This can help you:

    Re: Attachment workspace download - BPM Oracle 10 g R3

  • Try to download an attachment to an e-mail he immediately show up on the list of download as deleted and is not present in the download folder

    The problem only started a few days ago. Had no problems before. Comes with a screen saying windows error file not found in the download folder.

    Hi Mike,

    Thanks for posting your question in the community of Microsoft Windows. I understand that you face problems when downloading an attachment of an e-mail.

    I imagine the inconvenience that you are experiencing. I will definitely help you with this.

    To help you suggest several steps to solve the problem, I would appreciate it if you could answer the following questions:

    1. What mail client do you use?

    2. you receive an error code or message?

    3. have you made any recent hardware or exchange of software on your computer before the show?

    4. What is the file format of the attachment?

    5 is confined to a particular question or all attachments?

    6. What antivirus software are installed on your computer?

    I suggest you to save the file on the desktop.

    Also to disable the antivirus software and try to download the attachment.

    Please follow the methods and mark the question below:

    Method 1:

    You need perform a clean boot to prevent any third party conflicting application from interfering with your computer.

    To put the computer in a clean boot State, you must follow the steps in the article mentioned below and check with the question.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7:
    http://support.Microsoft.com/kb/929135

    Note: You must follow step 7 of the article mentioned above to recover your computer to a Normal startup after you complete all the steps.

    Method 2:

    Disable the antivirus software:

    http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-software

    Important note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 3:

    Scan your computer by using the Microsoft Security Scanner by clicking Download now to check if there is the infected virus or malware:

    http://www.microsoftsafetyscanner.com/

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Your response is very important for us to ensure a proper resolution. Please get back to us with the information above to help you accordingly.

  • Download audio files from email

    When I attach an audio file (mp3, AIFF, etc.) to an e-mail, it appears as a miniature black reading Control Panel. I tried to send such an email to myself to see how it will appear to a recipient, and it appears the same.

    It seems so we can play music directly from the email, but there seems to be no way to download the attachment; control-click does not open a menu that allows you to display an attachment in the form of regular icon or download it.

    If I first put the audio file in a folder and then attach the file to the e-mail address, which gets the problem, but in a rather cumbersome way. There must surely be a way to send an audio file to make it appear like a normal, downloadable attachment?

    I would appreciate the help.

    PS: I realize that you can use the ' save' button in the upper right of the email, but most recipients of e-mails could expect to be able to save the attachment directly from its icon.

  • How to view the attachment using BIS in my application?

    1. Yes. I can get access to the e-mail message.

    2. Yes. I can download all attachment to the device (but I won't do that)

    Is there a way to see the attachment of email, by using the BIS service, as does an application messages?

    You must download the full attachment. The native application works for some of the attachment then more recover (if supported) the BIS/Bes. Third-party applications would not have access to a part of the file and need to download it all.

  • Download files attached with a button

    Hi all

    I am creating the following: a button that initiates a download, only the downloadable files are not on a web server, but they are attached to the pdf. Is this possible?

    I don't want the user to have to download the attachment manually, but I want to lighten the process for their use of the hollow of a button.

    So basically, I need the same functionality as the web download, but I need to link to a file attached internally.

    Is this possible?

    Yes, it is possible by using following command.

    this.exportDataObject ("MyAttachment.pdf");

    I also created a template for you, see the attachment.

Maybe you are looking for