Javax.mail.mailexception while am trying to send the mail

Hi.
Am trying to send a mail from ADF Application am using SMTP Server to send the mail
I have added javamail.jar in my libraries
This is the code am using to send
    public String send() {
        // Add event code here...
        String to;
        to = new String();
        String host = "localhost";
        String from = "[email protected]";
        Properties properties = System.getProperties();
        properties.setProperty("mail.smtp.host", host);
        Session session = Session.getDefaultInstance(properties);
        try{
            MimeMessage message = new MimeMessage (session);
            message.setFrom(new InternetAddress(from));
            message.addRecipient(Message.RecipientType.TO,new InternetAddress("to"));
            message.setSubject(subj);
            message.setText(body);
            Transport.send(message);
            System.out.println ("Sent Message Successfully");
        catch(MessagingException max){
            max.printStackTrace();
        return null;
    }Am getting the exception as below
javax.mail.MessagingException: [EOF]
     at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
     at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
     at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321)
     at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637)
     at javax.mail.Transport.send0(Transport.java:189)
     at javax.mail.Transport.send(Transport.java:118)
     at view.SendMail.send(SendMail.java:78)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.el.parser.AstValue.invoke(Unknown Source)
     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
Could any one pls help me?
regards,
Prasad K T.

This question is better asked in a java forum or JavaMail forum {forum:id=975}
Timo

Similar Messages

  • Regarding Pages: I can't access the document I was writting on at all. I have tried to send the document to my email, I've tried to make a copy but nothing seems to work, it just shows up blank.

    Regarding Pages: I was writing using the app Pages when I left the page I was writting on but now I can't access it at all. I have tried to send the document to my email, I've tried to make a copy but nothing seems to work. The document still exists and I can see my writting as I can with all other documents but I can't open that page.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Connect the iPad to your computer and try to get the document via File sharing
    - Try getting the document from iCloud.com if you are using iCloud

  • I'm trying to set up a iTunes allowance account for my 11 year old daughter, I set up the account but put in the wrong email address, now it's trying to send the verification email to an old addy I no longer have access to. Help.

    I'm trying to set up a iTunes allowance account for my 11 year old daughter, I set up the account but put in the wrong email address, now it's trying to send the verification email to an old addy I no longer have access to. Help.
    I've tried looking at my own itunes account but I cannot seem to find the allowance account, it says I currently have zero allowance accounts.
    All I want to do is change the assigned email address.

    Who is the email provider? Not all accounts can be set up as POP3

  • TS2755 Hi All - I sent a text using my iphone 5 - It is PAYG and had no money in it. It tried to send as an SMS but gave the 'green button reject message'. After deleting the convo, the phone keeps trying to send the deleted text via SMS and wont stop not

    Hi All - I sent an sms using my iphone 5 - It is PAYG and had no money in it. (stupidly)
    It tried to send as an SMS but gave the 'green button reject message'.(no money)
    Step 2 in this stupidity - the phone keeps trying to send the deleted text via SMS and wont stop notifying me of this. Totally ruining the functionallity of my phone, and more so totally annoying. All I want to do is stop the constant re-trying of sending the deleted SMS.
    Any ideas?
    Many Thanks!

    Hi, many thanks for your help - Pressing and holding sleep/reset hasn't worked, the msg is still continually reporting it is failing to send. I can restore to a previous version however I'll lose my paid apps. Is there any way to work around this. I'm only concerned about one app - Epocam HD which I purchased last month. My last backup on PC is 4 March 13 - before I bought the paid app - Itunes advises me I'll have to re-pay to get my apps (app) back. Even though it advises that icloud backed up this morning at 1:30 am (which although it is before the text, I cannot manually select this restore).
    What a mess!

  • Im am trying to send the reset information for my apple security question to my email, they are not be received and it says it is sending it to a email that starts with c

    Im am trying to send the reset information for my apple security question to my email, they are not be received and it says it is sending it to a email that starts with c

    That's not a good sign if it said it was going to send it to an email address you've never heard of. Contact iTunes Support and let them know this: http://apple.com/support/itunes/contact/

  • Trying to send the alv's information to excel file

    Hello iam trying to send the alv's information, when i execute my program sent an alv with that information that i have selected and then i would like to sent that information that the alv containe to an excel file, that why i press the button located top of alv, this sent an excel screen but this screen appears plain,without information but doesn't send an error.
    thanks a lot for you help

    Mr Heilman:
    I am really sorry for to many question and this troubles
      this is the segment fo code that i am using:
    *& Report  ZREPORTE_PA9011
    REPORT  zreporte_pa9011 NO STANDARD PAGE HEADING MESSAGE-ID 02.
    *Tables declaration
    TABLES pa9011.
    TYPES BEGIN OF prueba.
            INCLUDE STRUCTURE pa9011.
    TYPES END OF prueba.
    DATA prueba TYPE STANDARD TABLE OF prueba WITH HEADER LINE.
    *declaracion de las variables para el alv
    TYPE-POOLS: slis.
    DATA: repname  LIKE sy-repid,          "variables alv
          heading  TYPE slis_t_listheader,
          layout   TYPE slis_layout_alv,
          fieldtab TYPE slis_t_fieldcat_alv.
    *Sections parameters
    SELECTION-SCREEN: BEGIN OF BLOCK bi WITH FRAME TITLE text-001.
    SELECT-OPTIONS subtipo FOR pa9011-subty.
    PARAMETER:     pbegda LIKE pa9011-begda.
    SELECTION-SCREEN: END OF BLOCK bi.
    START-OF-SELECTION.
      repname = sy-repid.
      PERFORM selecciona_datos.
      PERFORM transfer_to_alv.
    *&      Form  selecciona_datos
          text
    FORM selecciona_datos.
      REFRESH prueba.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE prueba FROM pa9011
      WHERE subty IN subtipo
      AND begda GT pbegda.
      IF sy-subrc NE 0.
        MESSAGE e000 WITH 'Aun no existen datos cargados'.
      ENDIF.
    ENDFORM.                    "selecciona_datos
    *&      Form  transfer_to_alv
    send the information from prueba into alv
    FORM transfer_to_alv.
      PERFORM initialize_fieldcat USING fieldtab[].
      PERFORM build_layouts USING layout.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           i_callback_program      = repname
         i_callback_user_command = 'AT_USER_COMMAND'
          i_callback_top_of_page  = 'BUILD_COMMENT'
          i_structure_name        =
           is_layout               = layout
           it_fieldcat             = fieldtab[]
           i_default               = 'X'
         i_save                  = g_save
         is_variant              = g_variant
         TABLES
           t_outtab                = PRUEBA
         EXCEPTIONS
           program_error           = 1
           OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "transfer_to_alv
    *&      Form  initialize_fieldcat
          text
         -->P_FIELDTAB text
    FORM initialize_fieldcat USING p_fieldtab TYPE slis_t_fieldcat_alv.
      DATA: l_fieldcat TYPE slis_fieldcat_alv.
      REFRESH p_fieldtab.
      CLEAR l_fieldcat.
      l_fieldcat-tabname = 'PRUEBA'.
      l_fieldcat-ref_tabname = 'PA9011'.
      l_fieldcat-sp_group = 'A'.
      l_fieldcat-fieldname = 'SUBTY'.
      l_fieldcat-seltext_m = text-t01.
      l_fieldcat-col_pos = 1.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'BEGDA'.
      l_fieldcat-seltext_m = text-t02.
      l_fieldcat-col_pos = 2.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ENDDA'.
      l_fieldcat-seltext_m = text-t03.
      l_fieldcat-col_pos = 3.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'AEDTM'.
      l_fieldcat-seltext_m = text-t04.
      l_fieldcat-col_pos = 4.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'UNAME'.
      l_fieldcat-seltext_m = text-t05.
      l_fieldcat-col_pos = 5.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'PREAS'.
      l_fieldcat-seltext_m = text-t06.
      l_fieldcat-col_pos = 6.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZDESCRSEGURO'.
      l_fieldcat-seltext_m = text-t07.
      l_fieldcat-col_pos = 7.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZASEGURADORA'.
      l_fieldcat-seltext_m = text-t08.
      l_fieldcat-col_pos = 8.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZCOBERTURA'.
      l_fieldcat-seltext_m = text-t09.
      l_fieldcat-col_pos = 9.
      APPEND l_fieldcat TO p_fieldtab.
      ENDFORM.                    "initialize_fieldcat
    *&      Form  build_layouts
          text
    FORM build_layouts USING p_layout TYPE slis_layout_alv.
      p_layout-colwidth_optimize = 'X'.
      p_layout-zebra = 'X'.
      p_layout-f2code = '&amp;ETA'.
      p_layout-detail_popup = 'X'.
    ENDFORM.                    "build_layouts
    *&      Form  build_comment
          text
    FORM build_comment.
      DATA: hline TYPE slis_listheader,
            text(60) TYPE c.
      REFRESH heading.
      CLEAR: hline, text.
      hline-typ  = 'H'.
      text =  text-h01.
      hline-info = text.
      APPEND hline TO heading.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = heading.
    ENDFORM.                    "build_comment

  • My iphone 4 says outgoing whenever i send an sms to multiple recipients.  does this mean it's still trying to send the message?

    my iphone 4 says outgoing whenever i send an sms to multiple recipients.  does this mean it's still trying to send the message?

    Perhaps someone from Apple could reply to this rather than leaving it unanswered?

  • Mail keeps trying to send the same email over and over

    I tried sending an email, but it was too big to send, but not matter what I do, it keeps trying to re-send it anyway (even after deleting the message), it says:
    "Mail has undone actions on some messages so that you can redo the actions while online. Mail has saved other messages in mailbox “On My Mac” in “On My Mac” so that you can complete the actions while online.
    Additional information: The connection to the server “imap.aol.com” on port 993 timed out."
    And I now have 5 of the same email in my outbox.
    please help!
    thanks

    You may have better luck posting this in the Leopard Mail forum:
    http://discussions.apple.com/forum.jspa?forumID=1223

  • I've exported my pages graphics document as a PDF file and can't seem to reduce the file size without compromising the quality of the photo's used even after choosing "best" quality.  I'm trying to send the file via e-mail but it's too big.  ??????

    I am trying to e-mail a graphics pages document I made as a PDF file.  After trying to resize the file, the photo's quality is compromised (really blurry) even after choosing "Best" quality.  What am I doing wrong.  As a regular full sized file (PDF) it's fine, but when it gets reduced, it's bad and it needs to get printed from the e-mail copy I'm trying to send.  HELP! Please.

    If there are a lot and/or large images the file will inevitably be large, no matter what.
    You can reduce them down as far as possible by cropping and scaling them to the final size before creating the pdf. You can do this by opening the images in Preview .app and using Menu > Tools to reduce the resolution and to crop.
    If you have used transparency effects eg shadow, reflection, transparency, 3D charts, OSX will by default render these at 72dpi in the pdf.
    Peter

  • I AM HAVING PROBLEMS forwarding e-mail to other people. When I pick forward and provide an address the phone just keeps trying to send the message. I get a message that it can't be sent due to my providernr

    I am having problems forwarding my phone e-mail to other people. I get a message that it cannot process my mail through my msn.com program and directs me to go to mail settings and change the provider. The phone just keeps trying to process sending the message out and I cannot stop it.

    Further info - I changed my security settings to allow apps from anywhere, and again tried to install.  I again got an error message
    that the update failed to install, and to contact Customer Support.

  • I have been trying to Send the Cannon photo Co an e-mail,wrong smpt

    I have been trying to email the Cannon Photo Co about parts and W/ firefox . Soon as I hit send, a screen comes up and say's SMPT is unknown, and please check setting?????
    == This happened ==
    Not sure how often
    == 1 day ago

    This means that your system mail client is not set up to send mail. It's likely that you used a ''web based e-mail client''.
    Try copying your message into a normal "Compose Message" screen from within your e-mail. (Go to your regular inbox and look for '''Compose''')

  • Ess / Mss Error while manager tries to open the workitem in UWL.....

    Hi Experts,
        As I am trying to apply the Loan details in ESS / MSS, Workflow is triggerred and workitem is received in the Manager's UWL. But when the Manager tries to open the Workitem it is going for dump. "As follows"....
    "    The initial exception that caused the request to fail, was:
      java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
        at java.util.ArrayList.RangeCheck(ArrayList.java:512)
        at java.util.ArrayList.get(ArrayList.java:329)
        at com.sap.aii.proxy.framework.core.JcoBaseList.get(JcoBaseList.java:272)
        at com.sap.aii.proxy.framework.core.AbstractList.get(AbstractList.java:230)
        at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCList.get(DynamicRFCList.java:281)
        ... 47 more  ".
    Like this there are 47 errors continued...
    What may be the cause? What should be configured...
    Here I have configured the "SWFVISU" with my tasks 'TS18900024" which in workflow.
    Kindly give me some solution to solve the issue..
    Regards
    Kannan

    Dear Kannan,
    I am also facing same error while opening the loan request from MSS-UWL.
    500 - Internal Server Error
      java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
        at java.util.ArrayList.RangeCheck(ArrayList.java:512)
        at java.util.ArrayList.get(ArrayList.java:329)
        at com.sap.aii.proxy.framework.core.JcoBaseList.get(JcoBaseList.java:272)
        at com.sap.aii.proxy.framework.core.AbstractList.get(AbstractList.java:230)
        at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCList.get(DynamicRFCList.java:281) 
        ... 47 more
    If you have any solution, please share.
    If any config docs please send across -  [email protected]
    Thanks & Regards
    Ganesh

  • I put an email into draft.When I opened it and tried to send the screen froze.

    I put an email into draft and when I reopened the draft and tried to send it,the screen froze

    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • Trying to send the audio of a example.dv video clip as .mp3 through mail.

    I imported a video clip and I need to send just the audio as an .mp3 through an email. The video file is a ( .dv ) How do I do this? Need a quick reply too.
    joshua

    Hi Jomala,
    open iMovie, create a New Project. In File menu, choose "Import" and select your .dv file. It will appear in iMovie as a clip. Put your clip in the iMovie timeline.
    In iMovie, Advanced menu, choose "Extract Audio".
    Close iMovie and save your project.
    Now, if you look in the "Media" folder of this new project folder created by iMovie, you' ll find a AIFF file (I think it's named "voice 01").
    Open iTunes and in iTunes preference, Advanced, set "Importing" to mp3 encoder.
    Drag your AIFF file into iTunes, select it and choose "Convert selection to mp3" in the Advanced menu of iTunes. It creates a new mp3 version of the sound file that you can drag and drop on your desktop then send by email.

  • TS1474 What do I do when it says " an unknown error has occured with this number after (13019) while im trying to sync the iPod touch?

    What do I do when this message pops up while trying to sync my iPod touch "An unkwon error has occured" followed by this number in parenthesis (13019)?

    Type "13019" into the search bar at the top of this page by Support and read the resulting help articles.

Maybe you are looking for

  • Hp deskjet 990c not printing in colour

    Hello I recently made the switch to a MacBook, however my hp deskjet 990c is now not printing in colour! Additionally, I can't seem to find how to enable double sided printing. Can anyone help me please?! I've attached an image on what happens when I

  • Help with external display please

    Hi, I'm using a min-dvi to VGA adaptor to connect a macbook core 2 duo to a dell 2001FP display. This is unsatisfactory as the characters on the dell look fuzzy. (The monitor itself is fine- when I hook it up to a dell inspiron under windows the disp

  • Offset Path in AI CS4 added overlaping unnecessary anchor points.

    Offset Path tool in AI CS4 offen added some unnecessary anchor points, these points were hard to find because they were overlaping. But when these path were used to blend, faulty effect come. I must remove them manually. It never happened in AI CS2.

  • SOA 10.1.3.3 & JDEV 10.1.3.3: No transform in FLOW in BPEL COnsole

    I create BPEL Project that includes a transformation. I compile and deploy. When I check the flow, there is no transform activity listed. Here is the Project.bpel: <?xml version = "1.0" encoding = "UTF-8" ?> <!-- Oracle JDeveloper BPEL Designer Creat

  • PC Companion & Bluetooth troubles

    I have the SE Cedar phone, i can sync with Outlook if i plug in my phone via USB cable.I want to use bluetooth to do ithis, it will work on my desktop computer but it wont on my laptop with integrated bluetooth, I click Sync and the screen hangs on "