Delay in receiving mail sent through Javamail

Hi all,
n the code given in http://www.javacommerce.com/destination65673/18274/SendMailUsingAuthentication.java
the, mail is received after 2-3 minutes after executing the code. How can I avoid that delay?
Also, how can I have a message, if we try to send the mail to an invalid 'To address'?
Regards,
Rony

There is website version and stand-alone version for sending mails. Website version is done using php and stand-alone is done using java. I work with stand-alone application and I use the code given in the link for sending mails.
In website version, the mail is received within 2 - 3 seconds, whereas, using the Java code, it is taking 2 - 3 minutes.
So, is this a problem of server?
Rony

Similar Messages

  • Mail sent through JavaMail gets sent back

    We use JavaMail to send e-mails out with PDF attachments. About 15% of the time, the mail comes back with the message javax.mail.MessagingException. When we send the same e-mail a few minutes later, it goes through without any problem.
    Any ideas what could be causing this?

    You need to look at the details. All MessagingException is telling you is that something
    failed. You need to know what failed. Print out the details of the exception, possibly
    including the stack trace. Also, you might want to turn on session debugging and look
    at the protocol trace it prints out.

  • Yahoo mail sent through Mail app do not appear when login into Yahoo mail

    Hi everybody,
    I have a problem that annoying me very much. I've used Yahoomail for very long before I bought a MBA. For the first time I use Mac OSX, I try to use Mac mail combine with my old Yahoo mail. Actually, I have done the config. But anything I do with my Yahoo mail through Mail app can't appear when I login into original Yahoo mail. For example: I sent a Yahoo mail through Mac mail, it's shown that the mail was sent sucessfully, but when I try to login into Yahoo mail on Web, the sent mail doesn't exist. And the same happen when I do the opposite: the mail I sent on Yahoo mail doesn't exist on Mac mail. It's a big trouble if I use other lap and try to contact with someone. So is there any solution can fix it?
    Many thanks

    I'm having the same problem, and the only help I ever seem to find suggested anywhere is "make sure its set up as an IMAP account"
    BUT it is! Mail automaticly sets all yahoo accounts up as IMAP. So is this just a yahoo problem? Is there anyway to fix this?
    For me the bigger issue isnt that I need to be able to check my e-mail through a web browser regulerly, but on my Iphone and Ipad the account, which is through the mail app, also dosnt show sent mail sent through the mac app.
    I agree this makes mail on my mac totally usless.

  • Not receiving mail sent to and from my own accounts! using latest OS8 and X10.9.5.Using Apple Mail account. Used to be able to do this!

    Not receiving mail sent to and from my own accounts! using latest OS8 and X10.9.5.Using Apple Mail account. Used to be able to do this!

    My system is OS8 and X10.9.5

  • Cannot receive pictures sent through text

    I was able to receive pictures sent through text up until two days ago. The first time I couldn't receive pictures I went to the hub settings -> display and actions --> turned on "download images automatically" and it worked.
    Now I just get "You have a message awaiting retrieval. Click the button below to download it" i can click on "download now" 10 times and it won't do anything.
    Help! 

    Hi newz10 and welcome to the BlackBerry Support Community Forums!
    Because picture messages are sent via the MMS service, I would recommend contacting your wireless network provider to ensure they are not having any issues with MMS or your account in general.
    Thanks.
    -CptS
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Several hour delay in receiving emails sent from mail?

    for 3 years i've had a pop email account with yahoo and it has worked flawlessly with my apple mail program until a few days ago when people started telling me that the emails i sent took several hours to reach them. so, using mail, i sent myself a test and confirmed the delay. emails i send immediately appear in my "sent" folder yet they don't reach their intended recipients until hours later. this problem is intermittent. there was a brief window the other day when emails i was sending from mail were arriving quickly. but, the problem soon returned and persists now. the problem does not affect the receiving of emails with mail. in other words, i am receiving all emails with mail. the problem only affects emails i send using apple mail.
    when i access my email account directly through yahoo to send emails, those emails arrive immediately.
    i hope i have described the problem clearly enough and i thank the community in advance for any insight and/or suggestions.

    If you select a message in Mail's message viewer, then select the menu item View > Message > Long Headers, the message headers will be displayed. Depending on how the message was routed, there may be several "Received" fields - these get added at each mail server that handles the message. Each "Received" field contains information such as IP addresses, host names, dates, and times - these can be used to tell how the message was routed and how long it took. Note that a sender can fake, or "spoof", their information (usually these are spammers), but once the message reaches real-world servers the information will be correct.

  • Where do i look for mail sent through thunderbird that does not get delivered

    I have two email clients. One is thunderbird and the other through my local server. I know some of my emails are not being received because of address changes.where do i find or set up undelivered mail notification in thunderbird . To address airmails answer;Thunderbird is being promoted as an open source stand alone email client if i'm not mistaken

    There is no such thing as a Thunderbird email account so not sure what you are talking about there. I am not even sure if you are talking about mail you have sent or mail you are expecting to receive.
    Thunderbird connects to your actual email providers server Inbox and downloads what is there. Maybe you should contact your email provider. You could check your providers Spam folder to see if mail is getting filtered there.

  • Mac mail not receiving mail timely - through the web or mac mail on computer

    for the past few days - my email works in the morning - then all afternoon - I can not receive email... sending is fine... then at about 7:30 at night - it all comes through - what is going on... this is ridiculous.
    Mac mail on the lap top
    AND
    through web server
    none are working - come on let's get this issue resolved it IS a mac mail issue Apple - fess up and fix it.

    mail goes into sent folder, there is a sound as normal, there is NO error message. i verify by send a copy to me or to my colleagues
    A sent message moved to the account's Sent mailbox indicates the message was successfully sent by the SMTP server used to send messages with the account. If the message cannot be sent for whatever reason, the message will remain in the Outbox mailbox with an error message provided. A successfully sent message is no guarantee the message will be accepted and received by the recipient's incoming mail server.
    EVEN using web based mac.com to access mail (from location(work)), i cannot send mail!
    When using webmail access to send a message with your .Mac account at work, is the message sent as with the Mail application and placed in the account's Sent mailbox which indicates the message was successfully sent but is not received or does something different occur?
    but Gmail works fine from location (work) both via Mail.app and via gmail web-based
    Then try selecting Gmail's SMTP server to send messages with your .Mac account when using the Mail application to see if this makes any difference or have you already tried this?
    i have used another Ibook to try both via Mail.app and web-mased mac mail from location (work) but also will not complete the send.
    i have configured a PC outlook express at location (work) for mac mail and it will not complete send
    i have used PC browser (IE) to access mac mail web based and it will not send from location (work)
    Are the messages also successfully sent with the Mail.app and webmail access on the iBook and with OE and IE on the Windows PC but not received by the recipient?

  • Stored reference of mail sent through "SO_DOCUMENT_SEND_API1"

    Dear experts,
    I am using  FM "SO_DOCUMENT_SEND_API1" to send mails to external systems in a program for enduser. Now i want to trace which mails are send through this program. Is there any standard table where the reference for sent mails and its return code are stored ?
    also, i am posting an external URL(POST method) using
    CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL. I also want to trace the posted URL and its result at the end of a week or month. is there any standard for the same storing the details??
    Thankx in advance.
    Krishan Kumar birmiwala.

    Hi,
    You can trace all the outgoing mails from the transaction SOST. i.e. internally search where this data is saved.
    Here you can differentiate internet address / SAP user id / etc..
    Specifically if you want to trace with respect to this program based on the date and user etc.. you can refer to the transaction STAD (Analysis by User), it will have all the info.
    Find where internally in which table this data is saved.
    Regards,
    Santhosh.

  • Subject in the mail sent through Batch Job

    Hi,
    We have a batch job which is running daily.
    Consumer wants the output of the batch job (spool request) in mail. We generally send the mail from batch job by filling the mail id in "Title field".. there is some third party involved in managing spool requests..
    But now consumer wants to send the mail with a subject line filled..
    I could not find any field or option in SM36 where i can fill in the subject..
    Please help. Now we are getting the subject as user id + spool request + system number.

    Check the below Code.
    DATA: NUMBYTES TYPE TST01-DSIZE,
            PDFSPOOLID TYPE TSP01-RQIDENT.
      DATA: BEGIN OF PDFDATA OCCURS 0.
              INCLUDE STRUCTURE TLINE.
      DATA: END OF PDFDATA.
      DATA: G1_LINES_TXT  TYPE I.
      DATA  : L_DOCUMENT_DATA    TYPE SODOCCHGI1,
              T_PACKING_LIST     TYPE STANDARD TABLE OF SOPCKLSTI1,
              W_OBJHEAD TYPE SOLI_TAB,
              T_OBJBIN TYPE STANDARD TABLE OF SOLISTI1,
              T_OBJTXT  TYPE STANDARD TABLE OF SOLISTI1,
              LW_PACKING_LIST    TYPE SOPCKLSTI1,
              L_LINES            TYPE I,
              W_RECEIVER        TYPE SOMLRECI1,
              T_RECEIVER         TYPE STANDARD TABLE OF SOMLRECI1.
      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.
    *...Read the Spool request number generated.
      SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
                            FROM TSP01
                            WHERE RQCLIENT = SY-MANDT AND
                            RQOWNER = SY-UNAME.
    *....Convert Spool to PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = G_SPOOL_NUM
          NO_DIALOG                = 'X'
          DST_DEVICE               = G_PDEST
        IMPORTING
          PDF_BYTECOUNT            = NUMBYTES
        TABLES
          PDF                      = PDFDATA
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
    *...Convert 132 char to 255 char
      LOOP AT PDFDATA.
        TRANSLATE PDFDATA USING ' ~'.
        CONCATENATE GD_BUFFER PDFDATA INTO GD_BUFFER.
      ENDLOOP.
      TRANSLATE GD_BUFFER USING '~ '.
      DO.
        IT_MESS_ATT = GD_BUFFER.
        APPEND IT_MESS_ATT.
        SHIFT GD_BUFFER LEFT BY 255 PLACES.
        IF GD_BUFFER IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    Creating the document attachment
      LOOP AT IT_MESS_ATT.
        OBJBIN = IT_MESS_ATT.
        APPEND OBJBIN.
        CLEAR: OBJBIN,
               IT_MESS_ATT.
      ENDLOOP.
    Creating the document to be sent
      DOC_CHNG-OBJ_NAME = 'IG Balance'.
    *.....Subject of the email.
      CONCATENATE 'Intragroup Confirmation from AoO: ' P_ZAOO INTO DOC_CHNG-OBJ_DESCR.
    DOC_CHNG-OBJ_DESCR = 'Intragroup Confirmation from AoO '.
    *...Body of the email
      OBJTXT = 'Please find attached a summary and details '.
      APPEND OBJTXT.
      OBJTXT = 'Any queries regarding the attached should be addressed to the contact names on the Report.'.
      APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Creating 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.
      DESCRIBE TABLE OBJBIN LINES TAB_LINES.
      OBJHEAD = 'Balace.PDF'. APPEND OBJHEAD.
    Creating the entry for the compressed attachment
      OBJPACK-TRANSF_BIN = 'X'.
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM   = 1.
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM   = TAB_LINES.
      OBJPACK-DOC_TYPE   = 'PDF'.
      OBJPACK-OBJ_NAME   = 'ATTACHMENT'.
      OBJPACK-OBJ_DESCR = 'Balance Report'.
      OBJPACK-DOC_SIZE   = TAB_LINES * 255.
      APPEND OBJPACK..
    Entering names in the distribution list
      DATA: L_CNT TYPE I.
      LOOP AT T_EMAIL INTO W_EMAIL.
        IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
          RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
          RECLIST-REC_TYPE = 'U'.
          L_CNT = L_CNT + 1.
        ENDIF.
        APPEND RECLIST.
        CLEAR: RECLIST,
               W_EMAIL.
      ENDLOOP.
      SELECT SINGLE ZAOO
                     ZCONTACT1
                     ZCONTACT2 FROM ZFI_MT_RPTRMAP INTO W_EMAIL
                     WHERE ZAOO EQ P_ZAOO.
      IF W_EMAIL-ZCONTACT1 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT1.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ELSEIF W_EMAIL-ZCONTACT2 IS NOT INITIAL.
        RECLIST-RECEIVER = W_EMAIL-ZCONTACT2.
        RECLIST-REC_TYPE = 'U'.
        L_CNT = L_CNT + 1.
        APPEND RECLIST.
      ENDIF.
    Sending the document
      IF L_CNT > 0.
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            DOCUMENT_DATA              = DOC_CHNG
            PUT_IN_OUTBOX              = 'X'
            COMMIT_WORK                = '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.
        CASE SY-SUBRC.
          WHEN 0.
            WRITE 'Email sent successfully'.
          WHEN 1.
            WRITE: / 'no authorization to send to the specified number of recipients!'.
          WHEN 2.
            WRITE: / 'document could not be sent to any of the recipients!'.
          WHEN 4.
            WRITE: / 'no authorization to send !'.
          WHEN OTHERS.
            WRITE: / 'error occurred during sending !'.
        ENDCASE.
      ELSE.
        MESSAGE S000 WITH TEXT-018.
        STOP.
      ENDIF.
    *...Delete Spool Request.
      DATA: SPOOLID TYPE TSP01_SP0R-RQID_CHAR.
      SPOOLID = G_SPOOL_NUM.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID             = SPOOLID
      IMPORTING
        RC                  =
        STATUS              =
        ERROR_MESSAGE       =

  • Urgent help needed.....Recalling the mail sent via Javamail

    Hi
    I have a java program that will send a mail via an SMTP server using Javamail API.
    Now i need to recall the message... is it possible??
    If i go the webmail of the account i am using, then i cant see the mail i send in the sent box.
    Regards
    Prasad

    No, it is not possible to recall a message.
    This is not specific to JavaMail, all internet email works this way.

  • Strange results when receiving mail sent form mail.app

    Hi all,
    I've searched these forums for an answer to this problem but I didn't find anything that seemed to fit the bill.
    I'm using the latest version of mail.app 2 with updates applied running in 10.4.3.
    I'm using Gmail as my mail server but have the same problem with other email servers I have tried.
    When I send mail to my work account (based on an exchange server) I'm getting some strange results. I'm using Windows 2000 and Outlook 2003 at work.
    When I send an (new) email with an attachment then all text that I write below the attachment in the email, when received through exchange at work, becomes an attachment its self. If this is a plain text email then the attachment is a text file, if it's a rich text email then the attachment becomes a webdocument (HTM). This is not the desired result!
    Similarly, if I reply to or forward an email, any text below new text I type into those emails becomes an attachment rather than an actual reply (with that attachment either a text file or a webdocument as stated above).
    My question therefore is how can this be corrected. It's rather annoying to have half my message cut off if I put an attachment half way through the email I am composing (I guess i could attach it to the end below all text and signature). Equally frustrating is having replied or forwarded text appear in an attachment.
    Thanks in anticipation.
    Adam
    Powerbook 12"   Mac OS X (10.4.3)  

    Hi all,
    Picture of what I describe above, thought it might help clarify what the issue is:
    Many thanks
    Adam
    Powerbook 12"   Mac OS X (10.4.3)  
    Message was edited by: adamsquire

  • Supress e-mail sent through SUS for PO creation

    We want to suppress e-mails going out to suppliers whenever a PO is created in the system. I have disabled the e-mail notification in SPRO->Supplier Self Services-> master data-> Settings for BP. However it seems the e-mails are still sent out. any help is greatly appreciated.
    Jay

    Hi Jai,
    I suppose I have a similar requirement. In my case invoices are e-mailed to customers whenever they are created. But instead of sending multiple e-mails with one invoice each as an attachment, customer wants one e-mail with multiple attachments of invoices generated in a day.
    I think on lines of suppressing e-mail that generates for every invoice and generating one e-mail at a particular time in a day which has to pick up all invoices created for a customer in a day.
    How to achieve this? I look forward to your help in this regard.
    Thanks for your time and effort spent for me in advance.
    Regards
    Jawahar

  • Don't receive mail sent by apple. Why? Can you help please?

    I recieve mail from others at my me/icloud account; only miss out on messages sent from or by apple.....

    Have *you* used CSS on the page(s)?  You are the one in control of this.  If you have not used CSS on the pages, then you wouldn't have a CSS file into which you can put this rule.
    Looking at the code on your page, I can see that you have embedded your CSS both in the non-editable and the editable parts of the template - so here is where you would put it -
    <style type="text/css">
    <!--
    html { overflow-y:scroll; }
    .style1 {
         font-family: Arial, Helvetica, sans-serif;
         color: #FFFFFF;
         font-weight: bold;
         font-size: 14px;
    .style3 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 16px;
         font-weight: bold;
         color: #FFFFFF;
    .style4 {
         font-family: "Times New Roman", Times, serif;
         font-weight: bold;
         font-size: 50px;
         font-style: italic;
         color: #999999;
    .style5 {
         font-family: Arial, Helvetica, sans-serif;
         font-size: 12px;
         font-weight: bold;
    .style6 {font-size: 14px}
    .style7 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
    -->
    </style>
    Also looking at your code, I can see that you need lots of practice with your CSS as you are making many 'new at this' mistakes:
    You are OVER defining content styles - there is no need to specify a font family or even font properties for every rule.  Often a single font declaration can cascade throughout your page by placing it on the body tag.
    You are using the Property inspector to apply your styles - get out of this habit and learn how to use the CSS panel instead.
    You are using classes for everything - get out of this habit and learn how to begin using containers, container id values, and descendent selectors.  There is nothing more daunting than trying to troubleshoot a page that contains hundreds of class attributes in the CSS.
    Paying attention to these three elements will make your pages leaner, and much easier to troubleshoot.

  • Cant receive mail sent to me at my .mac address.

    I am not getting emails addressed to me to my .mac address on my iPad or iPhone, but I am receiving them on my Macbook Pro & Macpro.
    I can receive them on my iPad or iPhone addessed to my .icloud  and .me address.
    As my .mac address is my original long standing address, how can I rectify this matter?

    If I were you, I would publicize my iCloud address as my new email address and phase out the .mac address.  You can simply forward messages from .mac if you like, but I believe they are automatically sent to the iCloud.com address anyway.

Maybe you are looking for

  • .rtf template and bi server repository failure (newbee tutorial)

    I've installed BISE1 on Windows Server 2003 and followed the tutorial. I successfully fulfilled all the excercises except the last one: the creation of Oracle BI Publisher Report from BI Server Metadata. I have created .rtf template in Word. The prev

  • No UDA Found for Dimension XYZ

    We are loading metadata into Planning using outline load utility. The command we are using is as follows: C:\Hyperion\products\Planning\bin\OutlineLoad -f:%scripthome%\EncPassword.txt /A:NFR /U:%Essid% /M /C /-F /I:C:\Data\NFR_Customer_Dim.csv /D:Ent

  • How to add attachments to Custom Stationary, having problems.

    I created some custom stationary by saving a page created in iWeb ,published, then choose the option -- save as stationary. All is well, I can select my custom staionary and enter text and send a message fine, but.... when I try to add an attachment

  • Computer thinks flash drive is a CD?

    When I insert my SanDisk USB flash drive into my computer, I get a message saying that I have inserted a CD. I know this is due to the fact that the flash drive came with the built in U3 software for Windows. Since this software can't work on a Mac,

  • Reverse Termination Error  The employee is not assigned to a Payroll

    Hello, I am trying to reverse terminate an employee, but I am getting the following error while doing so. Oracle Version : Release 12.1.1 "APP-PAY-06047: This employee is not assigned to a Payroll Cause: You cannot create Nonrecurring, additional, ad