Send a mail with photos multiple SO5.0

So far, I see an email with an attachment but not with images and I couldn't find useful for this information.

public void sendMailFolder() {

        try {
            // create a multipart
            StringBuffer sbFileBody = new StringBuffer();
            Multipart mp = new Multipart();
            TextBodyPart tbp = new TextBodyPart(mp, "your message body");
            SupportedAttachmentPart sap = new SupportedAttachmentPart(mp, "text/plain", "info.txt", sbFileBody.toString().getBytes("UTF-8"));
            mp.addBodyPart(tbp);
            mp.addBodyPart(sap);

            ServiceConfiguration sc = null;
            ServiceRecord[] records = ServiceBook.getSB().getRecords();
            for (int i = 0; i < records.length; i++) {
                if (records[i].getCid().equalsIgnoreCase("CMIME") && !records[i].isDisabled() && records[i].isValid()) {
                    ServiceConfiguration sct = new ServiceConfiguration(records[i]);
                    String mailAddress = sct.getEmailAddress().toLowerCase();

                        sc = sct;
                        break;
                   }
            }
            if (sc != null) {

                Session session = Session.getInstance(sc);
                Store store = session.getStore();
                Folder[] folders = store.list(Folder.SENT);
                Folder sentfolder = folders[0];

                if (sentfolder != null) {
                    Message message = new Message(sentfolder);
                    Address toAdress = new Address("[email protected]", "example");
                    message.setFrom(new Address(sc.getEmailAddress(), sc.getName()));
                    message.addRecipients(Message.RecipientType.TO, new Address[] { toAdress });
                    message.setSubject("Your mail subject");
                    message.setContent(mp);
                    message.addMessageListener(new MessageListener() {
                        public void changed(MessageEvent e) {
                            if (e.getMessage().getStatus() == Message.Status.TX_SENT) {
                                try {
                                    e.getMessage().removeMessageListener(this);
                                    System.out.println("Send complete");
                                } catch (Exception ex) {
                                    ex.printStackTrace();
                                }
                            }
                        }
                    });
                    Transport.send(message);

                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

ATM I have a table with 5 path to images on sd card.

Can someone show me how can I change it so I can add images to the post office?

Concerning

If a certain attention, what I've done

 for(int x=0;x 
         

Tags: BlackBerry Developers

Similar Questions

  • When I send e-mail thrugh photos I often get this response: error - ID:0 X 80070057.

    I get the error message - ID:0 X 80070057 on my XP computer.  Help!.

    When I send e-mail thrugh photos I often get this response: error - ID:0 X 80070057.

    This happens not all the time, but it happens often.

    Hello

    1. What mail client do you use?

    If you use Windows live mail, so I suggest you to report the problem in this forum:
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    Otherwise, provide us with more information, so that we can better help you.

    It will be useful.

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

  • 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

  • Question of sending e-mail with Treo Pro

    I always have the same problem with T-Mobile by sending emails. I have all my settings correct and with incoming and outgoing servers (using T-Mobile) and I can only receive, not send them. I'm extremely frustrated with that by the way I think about the passage of carriers to Verizon and get rid of the phone. Don't get me wrong, I've always loved Palm and treo. I thought that if I got the unlocked version of the Pro, it would work just as my Treo 755 has no problem. The only thing really different between the Pro and the 755 is now that it is running Windows Mobile software vs of the Palm (and of course all the improvements). I really need help on this cause I am actually count the days here until I change provider and go BlackBerry. Someone keep me a person of Palm and help out me! Thank you!

    Have you deleted the email account and re-create it to see if you can e-mail?  Get the Cannot Connect to server error?

    Is a known issue with WinMo 6.1 on sending e-mails with some e-mail providers that a fix has been posted here:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=d9d71b2e-d2dd-44F2-86e5-1e53aad7fb7a&displaylang=en

    This patch is not a ROM update, so each time a hard reset is done this patch will need to be reinstalled.

    Message edited by thetreoguy on 03/27/2009 18:40
  • 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.

  • Unable to send e-mails with pictures

    Original title: "E-mail."

    WHENEVER I HAVE TO TRANSFER EMAILS WITH PHOTOS THEY'RE NEVER THROUGH.

    Your Caps Lock key is stuck.

    You use Windows Mail? There are a few possible reasons.

    Tools | Options | Send | Mail sending Format. HTML settings. Ensure that: send pictures with messages is enabled.

    If this is the case, create a message of your choice with a photo and send it to your self. You see the picture? Does show in sent items?

    All the above OK? The transmission always delivers the case, or sometimes? If the latter, it may be the way that the image has been sent to you and you have no control over this.

    You may also have a stripping safety program attachments. Ensure that the analysis of e-mail is not enabled in your AV program

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

  • redirect e-mail with photos attached

    When you try to send an e-mail with an attached picture in live mail, I get a notice on the screen that live mail cannot

    find photos in the e-mail message.  Transmitted without, he is received with an empty box with an x in the top left corner, but

    No picture.  This is not consistent with each email, which cannot live mail search image when it appears on my

    perfectally screen?

    Submit all Live and Hotmail queries on the forum right here:

    Windows Live Solution Center
    http://windowslivehelp.com/

  • Why is sending e-mails with attachments slow

    Hello

    The context of this question is:

    • I had an Apple iMac for a little more than 3 years;
    • and I use "Mail" application to send/receive emails;
    • but it is not uncommon, when I send an email with one or several attachments all the e-mail does not receive to the recipient;
    • and after working with Apple and nowhere;
    • I am now using Thunderbird instead of Mail.

    I love Thunderbird, but I noticed that if I send an email with an attachment (an example is an email that I just sent with an attachment 2.6 MB), it takes some time to both (a) first of all send and then (b) copy the email to my folder 'send '.

    Are there changes 'settings', that I can do to speed things up, or do I just a bigger machine? (I noticed that over the years 3 +, I got the iMac, it is gradually slower and slower.)

    Concerning

    John Bugler

    Download of attachments usually takes much more time compared to the download, with most of the connections and has little to do with age or the quality of your material.

    If you have outgoing mail analysis antivirus software, which could slow down the process; Disabling outgoing mail analysis and see if that makes a difference.

    If your email service automatically copies sent to a folder IMAP messages sent (Gmail, Hotmail), you should uncheck "places a copy in" under the tools/account settings /AccountName/Copies & records to avoid duplicates and download additional time.

    In addition, if the IMAP account and your folder "sent" is important or not compacted, it may take more time to update (download a large file that is sent to the remote server). In this case, you can move messages sent to a separate IMAP or local folder. With POP accounts, sent messages are stored on the local computer and then go very fast.

  • Free app to send a mail with for fieldset

    Hello

    I want to open the app to send mails with to field set, so I'm using this code

    Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, new MessageArguments(MessageArguments.ARG_NEW, "[email protected]", "", ""));
    

    but I get the duplicate field, as you can see in the screenshot above.

    Can you tell me how to solve the problem?

    Thanks in advance.

    Kind regards

    Gianni.

    Hello

    This isn't a bug, bb automatically creates another field when you have entered the email address in the first field

    Does that help?

  • 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

  • Sending E-Mail with an attachment using PL/SQL

    Hello

    I am trying to send an E-Mail with an attachment using pl/sql on Oracle 9i.
    I found the code from the link below.
    http://www.orafaq.com/wiki/Send_mail_from_PL/SQL
    but the attachment it sends is defined in the pl/sql block.
    I want to attach a file in a different location. How can I do this?

    Thanks in advance

    If the attachment is also on the server (it must be on the server), you can load into a BLOB and which attach to your e-mail (you will need to create an Oracle Directory that points to the file to be attached).

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:255615160805 #68529763836665
    This thread is big enough, a ctrl + f there might give you some clues.

    Currently I do not have the mail api available on here, but I still have it on a "test/playground DB", so I'll take a look later, when I have time and place.

  • Problem sending large file with photo attachments

    • I tried to send a large file with Vista photo attachments.  It fails whenever he tries, so I'd just delete the email because I can not send or receive any other emails.  I deleted the file from my Outbox, but he's trying to send it whenever I log in. where should I go with that.  Thank you.

    http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.html

    Read through the info on the link above.

    And your ISP (Internet ServiceProvider) probably has limits on the size of files that you can send.

    See you soon.

    Mick Murphy - Microsoft partner

  • Send a mail with attachment

    How can I send you an email with an attachment, a photo for example

    It's a way to do this in OUTLOOK: -.

    http://Office.Microsoft.com/en-GB/novice/lets-attach-files-to-an-outgoing-email-HA010376900.aspx?CTT=1

    If you use a different messaging system, then it should work in a similar manner to the above.

  • Windows Mail: I try to send or to send e-mails with attachments, they send with no error code, but no one gets them!

    I even tried to send me and e-mail will appear in my sent folder but never arrives in my Inbox. I use verizon email and check my webmail account to see if they are in the spam, they are not in spam, in the inxbox, etc... just disappeared! It started just yesterday, before everything was OK. I tried a system restore think an update of windows has created the problem, restoration has not solved it. If I send my verizon webmail account, I can send and transfer emails with attachments... but not from windows mail. I can send text messages only from windows mail.

    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the CPUs, slows down sending and receiving and causes a multitude of problems such as time-outs, account setting changes and has even been responsible for the loss of messages. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3

    Why you don't need your anti-virus to scan your email
    http://thundercloud.NET/infoave/tutorials/email-scanning/index.htm

    Note that for many AV programs, it may be necessary to uninstall the program and reinstall in custom Mode and uncheck e-mail scanning when the option is available.

    Bruce Hagen
    MS - MVP October 1, 2004 ~ September 30, 2010
    Imperial Beach, CA

Maybe you are looking for