Editing an email and keep attachments

I am trying to change a body of the email when sending (after clicking on send, before turning off). I have everything working, but when I modufy the body, I lose attachments.

email is a type of Message.

works

message.setSubject ("abc")

does not work

message.setContent ("NewText" + message.getBodyText ());

I just want to precede the text in the textbody... y at - it an easy way to do this?

Thank you.

Two problems solved here, hope this is useful to someone else:

(1) my solution for adding text on the body of an email without affecting attachments:

Object pt = (Object) msg.getContent();if (pt instanceof BodyPart) {   String text = msg.getBodyText();   msg.setContent(banner + text);} else if (pt instanceof Multipart) {   Multipart mp = new Multipart();   TextBodyPart tbp = new TextBodyPart(mp,banner);   mp.addBodyPart(tbp);                            msg.setContent(null);     msg.setContent(mp);   msg.setContent(pt);}

(2) Message.setContent (Object) does NOT erase the existing objects, what drives them. This explains my 'setContent (null) ".

(3) If you just do a setContent (...) on a Multipart, you will lose your attachments... VERY STRANGE seen #2, huh? I repeated this hundreds of times... maybe a bug...

(4) the name of temporary file I received (e.g., SU1289433050093.tmp) is the name of the image resized file. You know how BB asks if you want to send the original or a smaller version? That!. I don't know how solve this one, so it's going to be a low-pri bug for now...

(AND SOMEONE KUDO ME!)

Tags: BlackBerry Developers

Similar Questions

  • Is it possible that I can see how much space is being taken up by all my emails and their attachments?

    Original title: STORAGE PROBLEM

    Is it possible that I can see how much space is being taken up by all my emails and their attachments? If I right click on an email it tells me the size, but if I try to highlight all emails the properties button is grayed out.

    For Windows Live Mail, go to C:\Users\user\AppData\Local\Microsoft\Windows Live Mail, right-click on the folder and select Properties.

    You may need to show hidden files. Type the Folder Options in the search box above the Start button and select view advanced settings and check that the box "display files and folders" and 'Hide protected operating system files' are not checked. You may need to scroll down to see the second element. You should also make sure that the box before "Hide extensions of known file types" is not checked.

    I don't know about Chrome.

  • Print of MS Outlook emails and their attachments in pdf format

    I have Acrobat Pro XI. Is it possible to print several emails and their attachments to PDF without having to open each one at a time? Attachments are for the most part, MS Word documents, and they must be printed to pdf and e-mail messages.

    Hi Jay,.

    You can use the plugin "Acrobat" in Outlook and select the messages or folders to convert to PDF

    Email attachments appear in the attachments section pdf files.

    Kind regards

    Rave

  • When you try to send pictures to family via email I get this error: 'your message seems to have triggered our spam filters. Could you edit your post and try again? Learn more. »

    original title: strange error on emailing photos
    I used Hotmail and Google Chrome on the front, send and receive emails and attachments without any problems until recently.

    Lately, trying to send a few family photos (no message) I got the following error message:

    "Your message seems to have triggered our spam filters.  Could you edit your post and try again?  Learn more. »
    I tried to "Learn more" and did not.
    The question is, how can a bunch of private photos trigger anything, especially because the real junk that reached me obviously don't.
    Any help with this would be most appreciated.
    Read

    Hi read,

    The question you have posted is related to Windows Live Mail and would be better suited to Windows Live help community. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=15

  • Recover space by deleted emails and attachments

    My Surface has too little disk space to refresh it.  Find the problem, it's a large file of emails and attachments that have been deleted, most of the months ago.  This file is located in C:\UsersName\AppData\Local\Packages\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\LocalState\LiveComm\ here is a 16 file number & letter.  Open it and then open the folder "120712-0049" and the file open the "Att".  In my case, this file uses about 4.5 GB of disk space.  Most of these files is empty, or contain a weed, often an image.  No problem on my desktop, but it is on my Surface.

    Can I delete old files from here?  Is it possible to prevent it from keeping files and attachments, especially the pictures of this file?

    My Surface is of 8.1, but I recently updated the desktop of Windows 10.  I don't think that's the problem, since this was done only a few weeks ago and most attachments are several months old.

    Hello

    Thanks for posting your query in Microsoft Community.

    From now on, I would ask to refer to the article below and the advice provided to free space on the Surface.

    Tips to free up disk space on your PC

    Do not hesitate to write to us in case you have any problems/concerns while working on your computer, we will be happy to help you.

  • I'm looking for jobs. keep changing my email and password.

    can you please let me know what my password is, and what is my username? I only use the Android phone in the docking station. I have no internet or computor. the verizin store tech gave me new names n paswords.

    I'm a fool when it comes to such things and I understand that you need a desk, he right.can you help me? Please

    Edit: removed personal information for your protection. (philipp)

    Hello, you're in a support forum for mozilla products - person don't we volunteer staff is able to help you with the credentials for account of third party sites. I'm afraid you will have to communicate directly with their support channels.

    Problems with email and how to find help

  • How can I stop firefox keep my email and facebook online password?

    How can I stop firefox keep my email and facebook online password?

    This has happened

    Each time Firefox opened

    is last week

    Tools > Options > Security > then remove the check mark next to «do not forget passwords for sites»

  • How can I download my email in mail and keep it in mail but remove it the optimal server?

    How can I download my email in mail and keep it in mail but remove it the optimal server?

    Select the e-mail messages of interest, and move messages to a folder on your Mac, Apple Mail.app calls these files 'mailboxes.    You can get to move through the menus (Messages > go) or you can alternate click on the selected messages and select move here.   You can create local folders (mailboxes) on your Mac (sub "on my Mac") according to the needs, and you can create so-called smart ball that allow you to have an easy way to save the searches that you use often, too.

  • Is there a way to avoid printing the body of the email and print just the attachments?

    I want to set the printer to only print attachments instead of print also the body of the email.

    Hi MJuds,

    The answer to your question is unfortunately not.  ePrint by default displays the content of the body of the email, and then it tries to open and print all attachments supported, as appropriate.

  • Is it possible to export a photo after editing and keeping the captured date?

    Is it possible to export a photo after editing and keeping the captured date? I got the impression that before Lightroom has not changed the date; now it doesn't...

    Please re - upload the same image that you exported and check the metadata.

    ~ UL

  • How can I change my email address and keep my photos

    How can I change my email address and keep my photos

    You can go to https://www.adobe.com/account/account-information.html and login to the adobe site to change the information in your account, including email.

    You can make changes to your profile here, change address e-mail, password, screen name, etc.. Revel is related to you adobeid, so that the changes will apply to your general connection to adobe as well as your account of revel.

    Guinot

  • Some edit fields like email and phone number are not captured in Firefox?

    Hello

    I tried to save the email and phone fields, and it does not seem to save the entry in these areas in one Firefox (works fine in IE).

    I had to write the script below to make it work. But no matter what body falls on the question?

    web.textBox (34, "{{obj ATG_repo. SIGNUP_email}}') .keyPress ("abc < SHIFT-2 > example");
    robot.keyPress (KeyEvent.VK_DECIMAL);
    web.textBox (34, "{{obj ATG_repo. SIGNUP_email}} ")." KeyPress ("com");

    I used the text it doesn't that is why I used the KeyPress method. Please suggest if you have other methods

  • Cannot restore the emails and files that have been saved in an earlier version of Thunderbird

    Thunderbird Auto-setting to update to the new version today (32.x.x). In need of a deleted message, I tried and failed to restore a MozBackup file that was created when running the version of Thunderbird (31.1.2).
    Then, I downloaded and installed version of Thunderbird yesterday (31.1.2). I ran MozBackup restore and while he went at the end of Job without error, I do not see my older emails and local files. So now I'm totally lost and worried. I have the MozBackup.pcv file and a profile that seems to keep records, premises, etc, I need. But whenever I start Thunderbird, I am asked to set up a new e-mail account. After 7 hours of reading, searching and trying, I would appreciate guidance
    Thank you

    Good to hear your problem has been fixed. You can mark it as 'Resolved' Please?
    Thank you.

  • When you use the FolderLink, emails always send attachments normally. Why?

    I created a box account so I could link files to emails instead of sending the file. But when the link of file appears in the body of the email and I click 'Send', the email more attachments is sent normally - that is the email takes a long time because it is not just send the link but is to send large attachments. I tried to remove the attachments from the email once the link of the file appears in the body of the email and then sent the e-mail. It went fast, but when the recipient attempted to get on the link, the message came that the files have been deleted. What else can I try?

    OK, it took some research, but I think we're seeing a disconnect between Thunderbird and Box. Box have changed the process of connection from July 1 and Thunderbird have not caught up.

    Bug fix that the change in Thunderbird appears to be still ongoing see https://bugzilla.mozilla.org/show_bug.cgi?id=1021684

  • Hi have a virus on my email software. He continues to send spam emails and cannot be deleted

    Hello

    have an I-phone 6 + there seems to be a virus on the messaging of the software. He continues to send spam emails and you can not delete your emails that they keep coming back

    help thank you

    Nope.  There is no virus running on iOS.

    Most likely your computer has been hacked / infected.

Maybe you are looking for

  • I'm selling my macbook pro, how do I clear it?

    How can I erase all my data and provide a "fresh" mac to the person who gets it?

  • WIN XP SATA drivers for Equium A100-338

    Hello I'm looking to ditch vista and put xp on this laptop, but I am afraid to completely destroy incase I can't readers for the disk sata hard. Can someone point me in the right direction to get the sata drivers? I intend to put xp pro on the laptop

  • Satellite Pro M30: compatibility with a TOSHIBA 320 GB external USB HDD

    Hello I was looking for a new external hard drive when I came across the disc toshiba 320 GB external hard. However, under the heading "compatible notebooks" it did not have my model. Is this a problem that suggests this will not work on my laptop or

  • Pavilion F3D65AA: made my HP Pavilion Desktop PC 500-214 built in microphone

    I'm new to computers and old in the world, so I don't know anything about that much. I just noticed that I may have the possibility of using the voice of thing google search. When I finally found how to pass parameters and so on, I checked activate t

  • Destination folder access denied

    Background.  I recently bought a new cell phone. It came with the dropbox app to move photos and videos taken with the phone to a PC.  I've installed dropbox on my PC and photo & video transfers started without problem. I run Windows Vista Ultimate x