Hi  problem while getting mail content

hi dude getting problem while retriving mail content from multipart/mixed mail the content is displaying like this
javax.mail.internet.MimeMultipart@146218a
please help me out

In case it wasn't clear to you, you've got a message with attachments.
See this entry:
http://java.sun.com/products/javamail/FAQ.html#mainbody
If you still don't get it, ask a more detailed question.

Similar Messages

  • Problems while retrieving from content repository

    Hi,
    I am facing problems while retrieving documents stored the content repository. I have some pdf files as well as text documents stored in the content repository. I need to get retrieve the contents of the text files. My problem lies with how to retrieve the data from the files.
    I have used SCMS_URL_GENERATE, followed by the FM ''HTTP_GET''.  Though I  do get the File id , my problem is how to proceed from this point. Should i wriite an RFC ?
    Thanks and Regards,
    Anie

    Hi,
    I checked the code one again - SCMS_URL_GENERATE is used to send url to the user (to open file in web browser).
    SCMS_HTTP_GET code looks like this:
    CONCATENATE <ls>-vbeln space <ls>-optarcnr
      INTO lv_vbeln_obj
      RESPECTING BLANKS.
    SELECT SINGLE *
      FROM toa01
      WHERE sap_object EQ 'VBRK'
        AND archiv_id EQ co_arch
        AND ar_object EQ 'SDOINVOICE'
        AND object_id EQ lv_vbeln_obj.
    CALL FUNCTION 'SCMS_HTTP_GET'
      EXPORTING
        crep_id   = co_arch
        doc_id    = toa01-arc_doc_id
        comp_id   = 'data'
        length    = 0
        no_cache  = no_cache
      IMPORTING
        length    = comp-size
        mimetype  = comp-type
      TABLES
        data      = comp-bin
      EXCEPTIONS
        not_found = 1
        OTHERS    = 2.
      IF sy-subrc IS NOT INITIAL.
        PERFORM log_create USING <ls>-vbeln.
      ENDIF.
    IF comp-bin IS NOT INITIAL.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = comp-size
          filename     = dstpc
          filetype     = 'BIN'
        TABLES
          data_tab     = comp-bin
        EXCEPTIONS
          OTHERS       = 1.
      IF sy-subrc IS NOT INITIAL.
        PERFORM log_create USING <ls>-vbeln.
      ELSE.
        MESSAGE s000(38) WITH 'Success'.
      ENDIF.
    ENDIF.
    Regards,
    Przemysław

  • Problem while sending mail

    The following code is not working,the mail is not getting posted to the receiver.Can sum1 plz help...
    DATA: objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA: objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
      DATA: objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
      DATA: reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE.
      DATA: doc_chng LIKE sodocchgi1.
      DATA: tab_lines LIKE sy-tabix.
    Creation of the document to be sent
    File Name
      doc_chng-obj_name = 'SENDFILE'.
    Mail Subject
      doc_chng-obj_descr = 'Send External Mail'.
    Mail Contents
      LOOP AT git_error INTO gwa_error.
       t1 = 'Success'.
       t2 = 'Operation successful'.
      ENDLOOP.
        objtxt = t1.
        APPEND objtxt.
        objtxt = t2.
        APPEND objtxt.
        DESCRIBE TABLE objtxt LINES tab_lines.
        READ TABLE objtxt INDEX tab_lines.
        doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creation of the entry for the compressed document
        CLEAR objpack-transf_bin.
        objpack-head_start = 1.
        objpack-head_num = 0.
        objpack-body_start = 1.
        objpack-body_num = tab_lines.
        objpack-doc_type = 'RAW'.
        APPEND objpack.
    Completing the recipient list
        reclist-receiver = '[email protected]'.
        reclist-rec_type = 'U'.
        APPEND reclist.
    Sending the document
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = doc_chng
            put_in_outbox              = 'X'
          TABLES
            packing_list               = objpack
            object_header              = objhead
            contents_bin               = objbin
            contents_txt               = objtxt
            receivers                  = reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            operation_no_authorization = 4
            OTHERS                     = 99.
        IF reclist-retrn_code = 0.
          WRITE:/ 'hello'.
    *WRITE 'The document was sent'.
        ELSE.
          WRITE 'The document could not be sent'.

    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_chng
    put_in_outbox = 'X'
    <b>commit_work = 'X'</b>
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    Just the parameter as indicated in bold and it should work.
    Dont forget to assign points for helpful answers

  • Problem while sending mail inOIM 11g r2

    HI,
    i am getting following error while sending mail in OIM 11G r2
    <Jun 13, 2012 12:53:25 AM PDT> <Warning> <oracle.adfinternal.view.faces.renderkit.rich.SelectItemUtils> <ADF_FACES-30118> <No help provider found for helpTopicId=create_user.>
    java.net.MalformedURLException: For input string: "SOA_PORT"
    at java.net.URL.<init>(URL.java:601)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at java.net.URI.toURL(URI.java:1081)
    at oracle.j2ee.ws.common.transport.HttpTransport.transmit(HttpTransport.java:61)
    at oracle.j2ee.ws.common.async.MessageSender.call(MessageSender.java:64)
    at oracle.j2ee.ws.common.async.Transmitter.transmitSync(Transmitter.java:134)
    at oracle.j2ee.ws.common.async.Transmitter.transmit(Transmitter.java:90)
    at oracle.j2ee.ws.common.async.RequestorImpl.transmit(RequestorImpl.java:273)
    at oracle.j2ee.ws.common.async.RequestorImpl.invoke(RequestorImpl.java:94)
    at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:811)
    at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235)
    at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106)
    at oracle.j2ee.ws.client.jaxws.WsClientProxyInvocationHandler.invoke(WsClientProxyInvocationHandler.java:254)
    at $Proxy422.send(Unknown Source)
    But it is known issue in OIM 11gr2 .
    solution is The cause of this error is malformed URL. To resolve the issue, provide the correct values for SOA_PORT and SOA_HOST in Enterprise Manager (EM).
    BUT i didn't find the SOA_PORT,SOA_HOST in EM console.
    Thanks,
    Edited by: 853559 on Sep 20, 2012 3:09 AM

    . Follow the steps mentioned below to configure the workflow notification properties:
    •     Login to EM console as weblogic user.
    •     Expand SOA.
    •     Right click on <soa-infra> ANY ONE WILL BE REFLECTED. Select SOA Administration --> Workflow notification properties
    •     Select "Email" from “Notification Mode” list
    •     Provide notification service field values as:
    o     Email : From Address * : [email protected]
    o     Email : Actionable Address : [email protected]
    o     Email : Reply To Address: [email protected]
    •     Click Apply
    •     Click "Go to the Messaging Driver page" link
    •     Select configure driver: Provide Driver-Specific Configuration as:
    o     MailAccessProtocol : IMAP
    o     ReceiveFolder : INBOX
    o     OutgoingMailServer : smtp.sample.com
    o     OutgoingMailServerPort : 25
    o     OutgoingDefaultFromAddress : [email protected]
    •     Click Apply
    If you are sending mail through xelsysadm account then change the value of “Email” field of that account .
    Also configure Email Server ITResource .
    Edited by: IAM_TECH on Sep 20, 2012 3:48 PM

  • PROBLEM WHILE SENDING MAILS TO MUTILPLE RECIPIENTS

    hi,
    while sending mails to multiple recipients,if any one of the mail id is invalid the mail is not being send to other valid mailids,how can this problem be resolved , so that other than the invalid recipient mail has to be send to other valid mailids

    COULD YOU PLEASE STOP SHOUTING?
    CAN YOU TALK LOUDER, I CAN'T HEAR YOU!

  • TS3276 can't download mail from windows live account.  I have deleted and re-set up the account but still won't work.  I can go online and access with no problem or get mail from other apple devices.

    Not able to get mail from windows live account.

    Firefox can find plugins in several locations, but Firefox 21 changed the location of the "shared" plugin folder so older installers like the Microsoft Windows Media Plugin no longer drop the DLL file in the correct location.
    There apparently are two ways to address this:
    (1) Change a Firefox preference so that Firefox checks the old location. Here's how:
    (i) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (ii) In the filter box, type or paste '''plugins''' and pause while the list is filtered
    (iii) Double-click '''plugins.load_appdir_plugins''' to switch its value from false to true.
    This will take effect after you restart Firefox.
    (2) Copy the plugins folder to the new location. Here's how on Win 7 64-bit:
    Open a Windows Explorer window to:
    C:\Program Files (x86)\Mozilla Firefox
    Right-click and copy the '''Plugins''' folder
    Double-click the '''browser''' folder to open it
    Right-click and paste
    Right-click the new copy of '''Plugins''' and rename it to '''plugins'''
    After restarting Firefox, the plugins in that folder should now be available.
    ''Edit: I suggest just doing #1.''

  • Problem while sending mail - wrapped text

    Hi,
    I'm sending mail with .doc attachment file using FM SO_NEW_DOCUMENT_ATT_SEND_API1 and I'm getting the mail with the attachment. But it's not in the same format what I see in the spool. It gets word wrapped which is not of my interest.
    Also I tried for a PDF attachment but it says it's not supported. I'm able to get DOC but not PDF. For my requirement it's better if I get the PDF format. Any body can help?????

    Hi,
    You can convert the Spool to PDF format and use the fun module SO_NEW_DOCUMENT_ATT_SEND_API1 to send to mail, the output will be of PDF format.
    see the sample code:
      INCLUDE ZINCUSMAIL                                                 *
    include <symbol>.
    data : i_doc_data like sodocchgi1.
    data : begin of i_pack_list occurs 0.
            include structure sopcklsti1.
    data : end of i_pack_list.
    data : begin of i_receivers occurs 0.
            include structure somlreci1.
    data : end of i_receivers.
    data : begin of i_contents occurs 0.
            include structure solisti1.
    data : end of i_contents.
    data : begin of i_header occurs 0.
            include structure solisti1.
    data : end of i_header.
    data : begin of i_att occurs 0.
            include structure solisti1.
    data : end of i_att.
    Internal Table for Internet address.
    data: begin of it_inad occurs 0,
            kunnr like kna1-kunnr,           " Customer Code
            name1 like kna1-name1,           " Customer Name
            ssobl like knkk-ssobl,           " Security Deposit
            klimk like knkk-klimk,           " Credit Limit
            opbal like bsid-wrbtr,           " Opening Balance
            clbal like bsid-wrbtr,           " Closing Balance
            smtp  like adr6-smtp_addr,       " Internet mail (SMTP) address
          end of it_inad.
    data : pdf_line(134),
           asdf like pdf_line occurs 0 with header line.
    data : pdf_table like tline occurs 0 with header line,
           pdf_fsize type  i.
    data : stuff(65000),
           len type i,
           pos type i,
           tab_lines like sy-tabix.
    data:  spoolid    type tsp01-rqident,
           spdel      type tsp01sys.
    data:  v_gjahrt like bsid-gjahr,
           fmondest(10),
           tmondest(10),
           kunnr1 like kna1-kunnr,
           gjah(4),
           fmon(10).
    *&      Form  hide_write
    form hide_write.
      new-page print on
        line-size 160
       line-count 58
        no-title
        no-heading
        destination 'LOCL'
        immediately ' '
        new list identification 'X'
        no dialog.
      set blank lines on.
    endform.                    " hide_write
    *&      Form  end_write
    form end_write using kunnr1.
      set blank lines off.
      new-page print off.
    ***Using Spoolid we are getting PDF formated file
      spoolid = spdel-rqident = sy-spono.
      spdel-sys = sy-sysid.
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
           exporting
                src_spoolid   = spoolid
                no_dialog     = 'X'
           importing
                pdf_bytecount = pdf_fsize
           tables
                pdf           = pdf_table
           exceptions
                others        = 0.
    ***Delleting Spool request
      call function 'RSPO_IDELETE_SPOOLREQ'
           exporting
                spoolreq = spdel
           exceptions
                others   = 2.
    ***Converting PDF table line size 134 into standard list size 255
      loop at pdf_table into pdf_line.
        if pos = 34170.
         perform attach.
        endif.
        stuff+pos(134) = pdf_line.
        add 134 to pos.
      endloop.
    if not ( stuff is initial ).
      perform attach.
    endif.
    clear pdf_line.
    clear pdf_table[].
    describe table i_att lines tab_lines.
    i_pack_list-transf_bin = 'X'.
    i_pack_list-head_start = '1'.
    i_pack_list-head_num = '1'.
    i_pack_list-body_start = '1'.
    i_pack_list-body_num = tab_lines.
    i_pack_list-doc_type = 'PDF'.
    i_pack_list-obj_name = 'LedgerMail'.
    concatenate fmon '-' gjah into i_pack_list-obj_descr.
    *i_pack_list-obj_descr = '2092-Oct03'.
    i_pack_list-obj_langu = 'E'.
    i_pack_list-doc_size = tab_lines * 255.
    append i_pack_list.
    ***Data for receivers list
    loop at it_inad where kunnr eq kunnr1.
    i_receivers-receiver = it_inad-smtp.
    i_receivers-rec_type = 'U'.
    i_receivers-rec_date = sy-datum.
    i_receivers-express = 'X'.
    i_receivers-com_type = 'INT'.
    i_receivers-notif_del = 'X'.
    append i_receivers.
    endloop.
    call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      exporting
        document_data                    = i_doc_data
      PUT_IN_OUTBOX                    = ' '
    IMPORTING
      SENT_TO_ALL                      =
      NEW_OBJECT_ID                    =
      tables
        packing_list                     = i_pack_list
        object_header                    = i_header
        contents_bin                     = i_att
        contents_txt                     = i_contents
        receivers                        = i_receivers
    exceptions
       too_many_receivers               = 1
       document_not_sent                = 2
       document_type_not_exist          = 3
       operation_no_authorization       = 4
       parameter_error                  = 5
       x_error                          = 6
       enqueue_error                    = 7
       others                           = 8
    refresh i_att. clear i_att.
    refresh i_receivers. clear i_receivers.
    delete i_pack_list where doc_type = 'PDF'.
    *refresh i_header.
    *refresh i_contents.
    *clear i_doc_data.
    endform.                    " end_write
    *&      Form  doc_data
    form doc_data using fmondest v_gjahrt.
    gjah = v_gjahrt.
    fmon = fmondest.
    ***Data for Document Data
    i_doc_data-obj_name = 'LedgerMail'.
    concatenate 'Customer Ledger for : ' fmondest gjah
    into i_doc_data-obj_descr separated by space.
    i_doc_data-obj_langu = 'E'.
    i_doc_data-obj_prio = '1'.
    i_doc_data-no_change = 'X'.
    i_doc_data-doc_size = '5101'.
    ***Data for Packing list
    i_pack_list-head_start = '1'.
    i_pack_list-head_num = '1'.
    i_pack_list-body_start = '1'.
    i_pack_list-body_num = '20'.
    i_pack_list-doc_type = 'RAW'.
    i_pack_list-obj_langu = 'E'.
    append i_pack_list.
    ***Data for Header
    i_header-line = 'Header'. append i_header.
    ***Data for contents
    i_contents-line = 'Dear Customer,'. append i_contents.
    i_contents-line = ' '. append i_contents.
    concatenate 'Please find your enclosed Ledger for the month of : '
    fmondest gjah into i_contents-line separated by space.
    append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = 'This is a computer generated document and does not
    require a signature.'. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = 'Note : If you do not have Acrobat Reader please click
    on the below link.'. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = 'http://www.adobe.com/products/acrobat/readstep2.html'
    . append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    i_contents-line = ' '. append i_contents.
    endform.                    " doc_data
    *&      Form  attach
    form attach.
      clear pos.
      len = strlen( stuff ).
      while len > 0.
        subtract 255 from len.
        i_att = stuff+pos(255).
        append i_att.
        add 255 to pos.
      endwhile.
      clear pos.
      clear stuff.
    endform.                    " attach
    reward if useful.
    regards,
    Anji

  • Problems while getting the Datasource from a Utill class

    Hi all,
    I faced a problem when following below instructions.
    http://dev.day.com/content/kb/home/cq5/Development/HowToConfigureSlingDatasource.html
    It would not return from the getDataSource(dataSourceName); call. No exceptions.
    public DataSource getDataSource(String dataSourceName) {
            DataSource dataSource = null;
            try {
             log.info("Reaches here ! ");
                dataSource = (DataSource) dataSourceService
                        .getDataSource(dataSourceName);
            log.info("Never Reaches here ! ");
            } catch (DataSourceNotFoundException e) {
                log.error("Unable to find datasource {}.", dataSourceName, e);
            return dataSource;
    I can connect to db directly from post.POST.jsp so DB is correctly mapped.
    I had to remove below annotation since while compiling the bundle, it says that it is deprecated.
         @scr.component immediate="true" metatype="no"
    Log is as follows...
    com.day.cqwebsite.impl.DatasourceUtilImpl -------------------------------------------- Using DataSourcePool service lookup to get connection pool mynewdsname
    26.09.2012 17:49:30.197 *INFO* [0:0:0:0:0:0:0:1 [1348661970143] POST /content/mywebsite_cq/en/toolbar/login.html HTTP/1.1] com.day.cqwebsite.impl.DatasourceUtilImpl Reaches here !
    26.09.2012 17:50:17.770 *INFO* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.impl.AgentManagerImpl Processing job for agent publish
    26.09.2012 17:50:17.770 *INFO* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish Sending POST request to http://localhost:4503/bin/receive?sling:authRequestLogin=1
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish Error while sending request: java.net.ConnectException: Connection refused: connect
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish Replication (ACTIVATE) of /etc/designs/mywebsite/images not successful: java.net.ConnectException: Connection refused: connect Conversation follows
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish ------------------------------------------------
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish Sending message to localhost:4503
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish >> POST /bin/receive HTTP/1.0
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish >> Action: Activate
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish >> Path: /etc/designs/mywebsite/images
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish >> Handle: /etc/designs/mywebsite/images
    26.09.2012 17:50:18.983 *ERROR* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.Agent.publish >> ...spooling 744 bytes...
    26.09.2012 17:50:18.983 *INFO* [pool-6-thread-32-com/day/cq/replication/job/publish(com/day/cq/replication/job/publish)] com.day.cq.replication.impl.AgentManagerImpl Job for agent publish processed in 1213ms. Failed.
    Any help will be great !
    Tx

    Could you please use [1], verify & confirm. If does not work let me know cq version & jdbc jar you are using.
    [1]
    import org.apache.felix.scr.annotations.Component;
    import org.apache.felix.scr.annotations.Properties;
    import org.apache.felix.scr.annotations.Property;
    import org.apache.felix.scr.annotations.Service;
    @Component(immediate = true)
    @Service(value = DatasourceUtil.class)
    @Properties({
            @Property(name = "service.description", value = "Data Source lookup example"),
            @Property(name = "service.vendor", value = "Day Management AG")

  • Problems while sending mail using java mail

    hi all,
    the following are the errors i get while sending a mail from my smtp local host-
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SendEmail
         public static void main(String[] args)
    System.out.println(args.length);
              if (args.length != 6)
                   System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
                   System.exit(1);System.out.println("jj"+args.length);
         SendEmail m=new SendEmail();
         m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
    public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
    boolean debug = false; // change to get more information
    String msgText2 = "multipart message";
    boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
    // set the host
    Properties props = new Properties();
    props.put("mail.smtp.host",smtphost);
         props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.sendpartial", "true");
    Authenticator loAuthenticator = new SMTPAuthenticator();
    System.out.println("f");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, loAuthenticator );
    session.setDebug(debug);
    try
    // create a message
    Message msg = new MimeMessage(session);
    // set the from
    InternetAddress from = new InternetAddress(emailfrom);
    msg.setFrom(from);
    InternetAddress[] address =
    new InternetAddress(emailto)
    //InternetAddress ad=new InternetAddress(session);
    msg.setRecipients(Message.RecipientType.TO, address);
    System.out.println("fc");
    msg.setSubject(msgSubject);
    System.out.println("fvf");
    if(!sendmultipart)
    // send a plain text message
    msg.setContent(msgText, "text/plain");
    System.out.println("fif");
    else
    System.out.println("felsd");
    // send a multipart message// create and fill the first message part
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/plain");
    // create and fill the second message part
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setContent(msgText2, "text/plain");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    // add the Multipart to the message
    msg.setContent(mp);
    Transport transport = session.getTransport("smtp");
         transport.connect(smtphost,"[email protected]","xyz");
    msg.saveChanges();
    System.out.println("fconn");
              //transport.sendMessage(msg,msg.getAllRecipients());
    transport.sendMessage(msg,msg.getAllRecipients());
    transport.close();     
    //Transport.send(msg);
    catch(MessagingException mex)
    mex.printStackTrace();
    return "Email sent to " + emailto;
    class SMTPAuthenticator extends Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username = "[email protected]";
    String password = "xyz";
    return new PasswordAuthentication(username, password);
    i dont understand what the problem is..inspite of having the right code..
    i guess some firewall problem..
    can somebody help me please..il be highly obliged..thanks..

    hi all,
    the following are the errors i get while sending a mail from my smtp local host-
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    import javax.mail.Authenticator;
    import javax.mail.PasswordAuthentication;
    public class SendEmail
         public static void main(String[] args)
    System.out.println(args.length);
              if (args.length != 6)
                   System.out.println("usage: sendmessage <to> <from> <smtphost> <true|false> <subject> <text>");
                   System.exit(1);System.out.println("jj"+args.length);
         SendEmail m=new SendEmail();
         m.SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]);
    public static String SendMessage(String emailto, String emailfrom, String smtphost, String emailmultipart, String msgSubject, String msgText)
    boolean debug = false; // change to get more information
    String msgText2 = "multipart message";
    boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue();
    // set the host
    Properties props = new Properties();
    props.put("mail.smtp.host",smtphost);
         props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.sendpartial", "true");
    Authenticator loAuthenticator = new SMTPAuthenticator();
    System.out.println("f");
    // create some properties and get the default Session
    Session session = Session.getDefaultInstance(props, loAuthenticator );
    session.setDebug(debug);
    try
    // create a message
    Message msg = new MimeMessage(session);
    // set the from
    InternetAddress from = new InternetAddress(emailfrom);
    msg.setFrom(from);
    InternetAddress[] address =
    new InternetAddress(emailto)
    //InternetAddress ad=new InternetAddress(session);
    msg.setRecipients(Message.RecipientType.TO, address);
    System.out.println("fc");
    msg.setSubject(msgSubject);
    System.out.println("fvf");
    if(!sendmultipart)
    // send a plain text message
    msg.setContent(msgText, "text/plain");
    System.out.println("fif");
    else
    System.out.println("felsd");
    // send a multipart message// create and fill the first message part
    MimeBodyPart mbp1 = new MimeBodyPart();
    mbp1.setContent(msgText, "text/plain");
    // create and fill the second message part
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setContent(msgText2, "text/plain");
    // create the Multipart and its parts to it
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    // add the Multipart to the message
    msg.setContent(mp);
    Transport transport = session.getTransport("smtp");
         transport.connect(smtphost,"[email protected]","xyz");
    msg.saveChanges();
    System.out.println("fconn");
              //transport.sendMessage(msg,msg.getAllRecipients());
    transport.sendMessage(msg,msg.getAllRecipients());
    transport.close();     
    //Transport.send(msg);
    catch(MessagingException mex)
    mex.printStackTrace();
    return "Email sent to " + emailto;
    class SMTPAuthenticator extends Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    String username = "[email protected]";
    String password = "xyz";
    return new PasswordAuthentication(username, password);
    i dont understand what the problem is..inspite of having the right code..
    i guess some firewall problem..
    can somebody help me please..il be highly obliged..thanks..

  • Java Session problem while sending mail(using javamail) using Pl/SQL

    Hello ...
    i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
    pls any help.

    props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
    Please format your code when you post the next time, there is a nice 'code' button above the post area.
    Mike

  • Problem while sending mail -Logo not appearing.

    Hi,
    The requirement  is to  send  a  message as a text  and not as a PDF attachment to a recepient.
    ( I am converting the smartform code  into HTML format  - I referred to url
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp which contains the rough code )  and am sending the mail to the
    recepient.
    The mail is getting generated, the text of the message is getting properly formatted as desired.
    But the company logo is not appearing .
    I am able to see the logo when I send the mail to my employer's mail  server outlook, but am unable to see
    the logo when I send the mail to the customer's mail server in  outlook.
    Can anybody suggest what could be going wrong?
    Regards,
    Girish.

    Hi Brad John,
    Thank you for your reply.
    I tried 2 methods :
    1. I attached the logo to the smartform and sent the mail to my employer's mail id and
    my customer's mail id.
    I am able to get the logo and text in my employer's mail server but in my customer's mail server,
    the text and logo are getting split into 2 attachments in the body of the mail
    instead I require the text and logo in the body of the mail.
    2. I  removed the logo in the smartform and tried typing the url in the smartform window text as suggested in
        URL http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2273. [original link is broken] [original link is broken] [original link is broken]
       The logo does not appear iin my employer's mail server but in my customer's mail server,
       all I get is a text of the URL.
    Can you please suggest the possible reason for this problem
    The  url of the IMG tag is accessible externall.
    What is meant by  drop/reference MIME data in a location that is external to corporate firewall.
    Please elaborate.
    Many thanks for your time and patience.
    Regards,
    Girish.

  • Problem while creating Oracle Content Server Identity plug-in  in SES

    Hi,
    I am Integrating Oracle SES with UCM.Both UCM and Oracle SES are installed on the same machine.
    I have installed SESCrawlerExport compoent on UCM and also taken Snapshot of Repository.
    But when i am trying to create Oracle Content server Identity plug-in in SES it gives following exception.
    Inputs:-
    1) HTTP endpoint for authentication- http://localhost:100/idc_new/idc
    2) Admin User - sysadmin
    3) Password - idc
    09/10/15 15:06:33 INFO     HTTPThreadGroup-7               URIHandler initialized for the URI http://localhost:100/idcnew/idcplg
    09/10/15 15:06:33 INFO     HTTPThreadGroup-7               StellentIdentityPlugin.autheticate: username=sysadmin
    09/10/15 15:06:33 FATAL     HTTPThreadGroup-7               EQP-80309: Exception while opening a stream to the URI: http://localhost:100/idcnew/idcplg
    09/10/15 15:06:33 FATAL     HTTPThreadGroup-7     EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt oracle.search.sdk.common.PluginException oracle.search.plugin.rss.HTTPHandler:getInputStream:302 java.lang.Thread:run:534
    09/10/15 15:06:33 ERROR     HTTPThreadGroup-7               EQP-80354: Exception while authenticating user sysadmin: EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt
    09/10/15 15:06:33 ERROR     HTTPThreadGroup-7     EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt oracle.search.sdk.common.PluginException oracle.search.plugin.rss.HTTPHandler:getInputStream:302 java.lang.Thread:run:534
    09/10/15 15:06:33 EQP-80353: Exception while validating parameters: EQP-80317: HTTP connect attempt failed after 3 attempts. Aborting connection attempt
    Please help me on the same.
    Regards,
    Nitin

    If the error message is correct, it means that no listener is running on port 100.
    Where did you get the URL http://localhost:100/idc_new/idc ?
    Is UCM using port 100 as it's standard port?
    What happens if you try to open this in a browser (running on the localhost machine)?

  • Runtime.getRuntime().exec() problem while getting Mozilla version.

    Hi all,
    I've trying to get the current mozilla version in Java side using
    Runtime.getRuntime().exec(). The sample code is as below.
    I've tested two cases using exec(), as case# 1 and case# 2.
    The result is after the code.
    try
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(new String[] {"mozilla", "-remote"}); //case# 1
    //Process proc = rt.exec(new String[] {"mozilla", "-version"}); //case# 2
    InputStream stderr = proc.getErrorStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    System.out.println("<ERROR>");
    while ( (line = br.readLine()) != null)
    System.out.println(line);
    System.out.println("</ERROR>");
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    } catch (Throwable t) {
    t.printStackTrace();
    // execute "mozilla -remote"(case# 1)
    $ java TestExec
    <ERROR>
    -remote requires an argument
    </ERROR>
    Process exitValue: 1
    // execute "mozilla -version"(case# 2)
    $ java TestExec
    <ERROR>
    </ERROR>
    Process exitValue: 0
    I'm just surprised that why case# 2 couldn't get the returned version string as case #1 ? Since there will be version string be returned from command line:
    $ mozilla -version
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830, build 2002083014
    Could anybody explain the problem or give any solution ?
    Thanks.
    -George.

    Hi all,
    One more question here.
    While I use Runtime.getRuntime().exec() to execute some commands,
    the commands may fail for some reason. Generally, they will return with the exit
    value set to 1 or others. But sometime, before waitFor() exits, there is a popped up
    dialog giving some info, and only after I click the "OK" button, it dispears, and
    waitFor() returns the exit value.
    So I'm not sure that could I suppress this popped up dialog, and make it run
    just like other commands ? I mean, just get the exit value by waitFor() without user
    interferance ?
    Thanks.
    -George.

  • Problems while sending mail using java mail..help...

    Hello all,
    I am new to Java Mail...
    Below is my first program...
    Can anybody tell what's wrong in it..??
    Thanks in advance....
    ------------------------------------------------------start--------------------
    package test;
    import java.util.Properties;
    import javax.mail.Address;
    import javax.mail.Authenticator;
    import javax.mail.MessagingException;
    import javax.mail.NoSuchProviderException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.Message.RecipientType;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class Send
         public Send()
         public void send()
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              Properties props=new Properties();
              props.put("mail.transport.protocol", "smtp");
              props.put("mail.smtp.host","smtp.gmail.com");
              props.put("mail.smtp.port","25");
              props.put("mail.smtp.auth","true");
              Session session=Session.getDefaultInstance(props,new MyAuthenticator());
              session.setDebug(true);
              MimeMessage message=new MimeMessage(session);
              try
                   message.setContent("Hello ...","text/plain");
                   message.setSubject("Test mail...plz don't ignore..");
                   Address to=new InternetAddress("[email protected]");
                   Address from=new InternetAddress("[email protected]");
                   Address replyTo=new InternetAddress("[email protected]");
                   message.setFrom(from);
                   message.setReplyTo(new Address[]{replyTo});
                   message.setRecipient(RecipientType.TO,to);               
                   Transport.send(message);
              } catch (AddressException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NoSuchProviderException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (MessagingException e)
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public static void main(String[] args)
              new Send().send();          
         class MyAuthenticator extends Authenticator
              MyAuthenticator()
                   super();
              protected PasswordAuthentication getPasswordAuthentication()
                   return new PasswordAuthentication("[email protected]", "*******");
    --------------------------------------------end--------------
    here is the output.....
    DEBUG: setDebug: JavaMail version 1.3.2
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: useEhlo true, useAuth true
    DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
    220 mx.gmail.com ESMTP 16sm2443823wrl
    DEBUG SMTP: connected to host "smtp.gmail.com", port: 25
    EHLO jijo
    250-mx.gmail.com at your service
    250-SIZE 20971520
    250-8BITMIME
    250-STARTTLS
    250 ENHANCEDSTATUSCODES
    DEBUG SMTP: Found extension "SIZE", arg "20971520"
    DEBUG SMTP: Found extension "8BITMIME", arg ""
    DEBUG SMTP: Found extension "STARTTLS", arg ""
    DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    530 5.7.0 Must issue a STARTTLS command first
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at test.Send.send(Send.java:50)
         at test.Send.main(Send.java:68)
    QUIT
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
         at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at test.Send.send(Send.java:50)
         at test.Send.main(Send.java:68)
    Can any body help me..??
    Thanks and Regards
    Jijo vincent

    Hi All,
    I am new to javax.mail.
    I have attached my code and also error here...
    can anyone help to resolve the error?
    Code:
    public class MailExample {
         public static void main(String args[]) {
              try {
              String host = "localhost"; //args[0];
              String from = "[email protected]"; //args[1];
    //          String to = "[email protected]";//args[2];
              String to = "[email protected]";//args[2];
              java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              // Get system properties
              Properties props = System.getProperties();
              // Setup mail server
              props.put("mail.smtp.host", host);
              props.put("mail.smtp.starttls.enable","true");
              //props.put("mail.smtp.auth","true");
              // Get session
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(true);
              // Define message
              MimeMessage message = new MimeMessage(session);
              // Set the from address
              message.setFrom(new InternetAddress(from));
              // Set the to address
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
              // Set the subject
              message.setSubject("Hello JavaMail");
              // Set the content
              message.setText("Welcome to JavaMail");
              // Send message
              Transport.send(message);
              catch(AddressException ae){
                   ae.printStackTrace();
              }catch (MessagingException e)
    //               TODO Auto-generated catch block
                   e.printStackTrace();
    Error:
    DEBUG: setDebug: JavaMail version 1.3.3ea
    DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
    DEBUG SMTP: useEhlo true, useAuth false
    DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
    220 localhost
    DEBUG SMTP: connected to host "localhost", port: 25
    EHLO HDCHCTDAM33726
    250-localhost
    250 HELP
    DEBUG SMTP: Found extension "HELP", arg ""
    DEBUG SMTP: use8bit false
    MAIL FROM:<[email protected]>
    250 [email protected] Address Okay
    RCPT TO:<[email protected]>
    250 [email protected] Address Okay
    DEBUG SMTP: Verified Addresses
    DEBUG SMTP: [email protected]
    DATA
    354 Start mail input; end with <CRLF>.<CRLF>
    Message-ID: <10736847.01125315340863.JavaMail.sangeetham@HDCHCTDAM33726>
    From: [email protected]
    To: [email protected]
    Subject: Hello JavaMail
    MIME-Version: 1.0
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Welcome to JavaMail
    com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: [email protected]
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
         at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1160)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:538)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at org.worldbank.webmfr.util.MailExample.main(MailExample.java:55)550 Invalid recipient: [email protected]
    com.sun.mail.smtp.SMTPSendFailedException: 550 Invalid recipient: [email protected]
         at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1333)
         at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1160)
         at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:538)
         at javax.mail.Transport.send0(Transport.java:151)
         at javax.mail.Transport.send(Transport.java:80)
         at org.worldbank.webmfr.util.MailExample.main(MailExample.java:55)
    QUIT

  • Pb while getting mails from my Yahoo account

    Hi,
    Since two days geting mails from my Yahoo account doesn't work. It all begun with Mail saying it must rebuild the index at start up. Ok I let it dot it. It then tried to download my whole Inbox from thr Yahoo account and get stuck at some point (I had more than 300 messages there).
    Ok I removed them all and tried again, and now Mail still gets stuck while downloading the first unread mail. The message appears in Mail but the transfer is not completed (the Activity Window shows that sthg is not finished), and I cannot quit unless I force it to quit. I tried different things, but nothing worked (index again, emptying my Inbox in Mail,...).
    Sending emails works fine.
    Thank you for any hint
    Syle

    For the Yahoo contacts, click on the following link for instructions regarding importing contacts.
    http://help.yahoo.com/l/us/yahoo/addressbook/impexp/impexp-11.html?terms=download+contacts+on+palm+c...
    Regarding Express mail subfolders, they are not supported at this time.
    For reference purposes, click on the following link for the support page for your device on the kb.palm.com webpage.
    http://www.palm.com/us/support/centro/centro_att/
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.
    Post relates to: Palm i705

Maybe you are looking for

  • Is it possible to replace Preview v5.5 (Lion) with Preview v5.0 (Snow Leopard)?

    I am finding certain 'improvements' in Preview v5.5 quite irritating and pointless ('save a version', not asking to save a file, basically stuff that was well implemented in v5.0). If it ain't broke, don't frickin fix it, Apple! What's the point of t

  • How can I put text (in perspective) round two sides of a 3d object?

    If I have a block of text that I want to wrap across two planes of a 3D building, how do I do that...while keeping both sides in perspective on the respective planes. Suppose I want a letter to be split in the middle so that part is on one plan and p

  • URI syntax issue.

    Gday everyone, The following snippet throws a URISyntaxException:Illegal character in query at index... I can understand that it doesnt like he pipes in the url. Any ideas on how to overcome this syntactical problem besides removing the pipes? try {

  • Search on a Qualify Table using MDM Webservices

    Hello I´m trying to use the standard MDM 7 webservice to search records in a Qualify Table and I´m having some problems. When I try to search records in a non-qualify table, it works perfectly, but when I search on a qualify table, I get the followin

  • HD won't spin down automatically

    IMac DV+ "450" ruby red. Panther 10.39 - no extra software installed. Firmware update done as recommended. Original HD still inside. Replaced CD drive with DVD drive >> set HD to slave. Problem now: Energy saver will not spin down HD although checkbo