Problems to read attachment of email in javamail 1.4.1 (IOException)

Hi
please somebody explain to me because it happens the following exception
java.io.IOException: Error in encoded stream: needed at least 2 valid base64 characters, but only got 0 before padding character (=), the 10 most recent characters were: "UQkIADsA\r="
     at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:246)
     at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:135)
     at java.io.FilterInputStream.read(FilterInputStream.java:90)
I am using javamail 1.4.1, I have tried to find because of this exception to be able to solve it, but I have not found anything
Thanks

I come across the same problem.When i use client app (outlook) to parse mail, it's current. So, when I set javamail "mail.mime.base64.ignoreerrors=true" system property, It's OK. (BASE64DecoderStream)

Similar Messages

  • Adobe Reader 'Attach to Email' is not working

    I have a client that is running Windows 7 and when opening a PDF with Adobe Reader is unable to use the "Attach to Email" function. We tried this with Adobe X, Adobe 9.3, Adobe 9.4.2. None of these will work. An error occurs: "Acrobat is unable to connect to your email program." We get the same error on any of these versions. For some reason Adobe 9.3.4 upgrade does not install with 9.3, where I read in a resource discussion that this version should work ion Windows 7.
    Adobe Reader X seems to be a known issue with Windows 7 for this problem. My client recently upgraded from Windows XP and did not have this problem on that OS. A current work-around is to save the PDF then attach it to an email, but she would greatly prefer to use the Attach to Email function within Adobe Reader without having to save the PDF and manually attach it.
    Thanks for any help!

    Bigshrimpin
    Apr 1, 2011
    I have the same issue using Acrobat X and Thunderbird 3.1.6 on Windows 7.  Attach to email function is NOT working.
    It worked when I had outlook 2007 installed, but I couldn't find where to change the setting to thunderbird.
    I uninstalled outlook.  Now the attach to email feature won't work at all.
    Thunderbird is set to the default email client in windows . . . this is extremely annoying!!
    File > Attach to email . . .  It appears this feature doesn't work with any emails client except outlook??????
    Attach to email worked on WinXP for Lotus Notes 8.5 email client (maybe an older Adobe Reader, version 9.4), but not after we upgraded to Win7. No Adobe Reader versions we have tried will work on Win7 for Lotus Notes.

  • Problem with shortcut attachment in email

    Hi Workflow consultants,
    I have 2 problems using the program RSWUWFML2.
    Iu2019m using RSWUWFML2 program with the following data as input data and scheduled it to run every minute in background to send email for the work items.
    Job suffix: 2
    Task: <our respective task>
    New Work Items Only <checkbox>
    One Message per Work Item
    Work Item Execution <checkbox>
    Message Class for Subject:      SWU_NOTIF     
    Message Number for Subject:      2
    All <Radio button>
    Problem1:
    This is a PR approval scenario. Whenever a PR is released at a particular level, the next level approver will be intimated via email to release from his side. The email contains the attachment u201CExecute Work Item.SAPu201D. When I click the attachment I get the following messages before getting the logon dialog box.
    Screen 1:
    Not all data for SAP GUI shortcut is available.
    System description and GUI start parameter are unknown.
    Enter the missing data.
    After giving OK.
    Screen 2:
    Screen title: SAP shortcut properties
    Title: <blank>
    Type: Transaction
    Transaction: *swnwiex p_action=EXECUTE; p_wi_id=000000660172; DYNP_OKCODE=ONLI
    System description: (Other system)
    System ID: DEV
    Start parameter: <blank>
    Client: <displayed correctly>
    User: <respective approveru2019s user id>
    Password: <disable>
    Language: EN
    When I select the system description manually as my development system and given OK, then the logon dialog box comes as expected.
    Problem2:
    The program RSWUWFML2 which is scheduled to run at background every minute sends the same email every one minute to outlook.
    But when I run the program manually, it sends the email only once. And when I execute it again immediately after receiving the email, it says u201C0 work items were read. None were sentu201D .
    Please help me on what to do to get the logon dialog box once the shortcut is double clicked from email.

    Hello,
    Problem 1)
    In a previous question about this in SDN, someone (sorry, can't remember who) answered:
    "Have you or the user logged into the SAP GUI before? If not, have them login in. Our problems occured
    with new users that never logged into the SAP gui and so the user profile was never loaded with the ini
    file."
    Please try that.
    Problem 2)
    Are you sure it's running with the same variant in the background?
    What if you try every 5 minutes instead - maybe a minute is too short and it gets mixed up.
    You could also try copying RSWUWFML2 to ZRSWUWFML2, inserting an infinite loop and then attaching to it in order to debug it in the background.
    regards
    Rick Bakker
    Hanabi Technology

  • Problem with .TIF attach in email

    When I receive an email with a tif attachment my iphone shows a box within "?" and don't display the image.
    But sometime iphone shows the tif attachment.
    Why this? What type of difference?

    Likely something specific about the files themselves, then (e.g. type of compression, byte order, etc.) - things that can be set when saving a tif in Photoshop, for example.
    You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html

  • Problem in Reading Mail Attachement

    I'm facing a problem while reading mail attachments. Java-mail returns null disposition for the below message,but this message has attachment javamail is not considering the mail attachment .I'm using java-mail 1.3.Can anybody help me to solve this problem ?
    Return-Path: prvs=00548bd8bd=[email protected]
    Received: from PRODTM1.TRUST.UASC.AO ([172.28.2.143])
         by trust.uasc.net
         ; Mon, 14 Mar 2011 11:07:04 +0000
    X-TM-IMSS-Message-ID:<[email protected]>
    Received: from gw.northport.com.my ([202.188.31.130]) by trust.uasc.net ([172.28.2.144])
    with ESMTP (TREND IMSS SMTP Service 7.1) id 45727fb90003495a ; Mon, 14 Mar 2011 11:06:52 +0000
    Received: from [192.1.10.13] (port=59768 helo=nmbsmtp-01.northport.com.my)
         by gw.northport.com.my with esmtp (Exim 4.69)
         (envelope-from <[email protected]>)
         id 1Pz5bs-0003EO-0A; Mon, 14 Mar 2011 19:06:48 +0800
    X-CTCH-RefID: str=0001.0A090205.4D7DF6C8.0116,ss=1,fgs=0
    Date: Mon, 14 Mar 2011 19:05:50 +0800 (SST)
    From: AMTedi-Container Svcs <[email protected]>
    Message-ID: <[email protected]>
    Mime-Version: 1.0
    To: [email protected], [email protected],
    [email protected], [email protected]
    Subject: CODCT1UAS
    Content-Type: multipart/mixed; boundary="-"
    X-TM-AS-Product-Ver: IMSS-7.1.0.1394-6.5.0.1024-18010.003
    X-TM-AS-Result: No--4.942-5.0-31-1
    X-imss-scan-details: No--4.942-5.0-31-1

    If you were assuming that every message would have a valid body part
    and that they would tell you definitively which parts you should consider to
    be "attachments", ya, that won't work. The disposition is a hint at best.
    It can be wrong. It might not even be there.

  • DEP crashes Adobe Reader 9.4.2 when using attach to email

    Hi
    I face a problem on our two windows 2008 SP2 RDS servers. When viewing a .pdf file in Adobe Reader 9.4.2 and using the attach to email option the program gets shut down by Data Execution Prevention and crashes AR. Usually with one of these errors.
    Faulting application AcroRd32.exe, version 9.4.2.220,  time stamp 0x4d467676,  faulting module dhcpcsvc.DLL, version 6.0.6002.18005, time stamp 0x49e03708, exception code 0xc0000005, fault offset 0x00001895, process id 0x3e04, application start time 0x01cbe879dbad53f0.
    sometimes its dhcpcsvc6.dll too.
    We're running Outlook 2007.
    It is not possible to add AcroRD32.exe to the exceptionlist for DEP.
    Any word on how to fix this?

    Could someone from Adobe respond to this specific issue so that we know we are being heard?  Will the fix for the print issue also resolve the 'attach to email' problem?  Is there any work around other than telling users to attach directly from their email programs?
    Thanks in advance for your response to our concerns.
    Penny

  • The message cannot be seen on incoming emails.  I can only view the message if I click on reply.  Also any links attached to email will not open.  I have tried everything to solve the problem but not able to.

    A message cannot be seen on my incoming emails.  I can only view the message if I click on reply.  Also any links attached to email will not open.  I have tried everything to solve the problem but not able to.

    Try closing the Mail app completely and see if it works properly when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Adobe Attach to Email problem

    I have recently installed Windows 7 Home Premium and Adobe Reader 9.4.0. Whilst in Adobe Reader I attempt the attach to Email and receive this error message "Acrobat is unable to connect to your email program". Any Ideas how I overcome this problem. Sorry, I forgot to say that Windows 7 Live Mail is the only mail program that is running on this system.

    Answered in another thread.

  • How to read emails using javamail

    hello friends
    well i am working on a project on phishing for that i had usinf javamail to read out the mails while i open my any email account while i working on the net .
    actually what i want is whenever i open my account my program could detect the mail and it will it work after that
    so can anyone please help me out in doing this means my first problem is how to get my program get linked with that so that everytime i opem my email account (not specific) i can use the message stuff written in that for my further use
    please help me guys i really need help
    please reply as soon as possible
    thanks

    i could not understand your problem exactly.
    if you mean you want to check the new messages count: you can simply used
    int newMessages = folder.getNewMessageCount();if you are reading mails first time using javamail.
    see http://itoday.wordpress.com/2007/04/08/sending-mail-using-javamail-apis/
    if you mean something else ... please let me know
    asif shahzad
    Edited by: asifsh7 on Jul 22, 2008 8:53 AM

  • Problems with .pdf as an email attachment

    All of a sudden, I am having problems attaching my email newsletter (5 pages .pdf combined in one),  this is in Yahoo email or gmail.  I've been doing it for a few years with no problem.  It just won't load.

    Are you using Reader or CreatePDF?

  • Latest Adobe Reader, PDF will not attach to email message

    I downloaded the latest Reader Jan 2014, I can use PDF's fill in forms etc as normal. However when I go to attach the PDF to my email (Tried Hotmail/Outlook, Yahoo mail, Mail.com) once the file has been selected to attach a messagi in the window where the PDF normally appears reads; PLEASE WAIT, if this message is not eventually replaced by the proper contents of the document, your PDF reader may not be able to display this type of document.
    The reader operates as normal, I have removed and reinstalled reader but it will not attach the PDF no matter how long you wait. Please HELP
    OS windows 7

    I do not understand as I have never had a problem sending PDF's by email prior to installing version XI, if I remove it and reinstall version X do you think it will cure the problem?
    thank you

  • Reader File attach to Email

    Win & x32 7 x64 Reader ver9. Outlook 2003 & google sync
    Try to attach to email and get generic error msg.
    My gut tells me its a Reader problem trying to start email.
    FYI, XP works fine.

    As suggested by vbhv_malik, Microsoft Office 2010 (x64) is not supported by Adobe Reader.To know about PDFMaker-compatible applications please refer to http://kb2.adobe.com/cps/333/333504.html

  • Problem reading attached PDF files

    <!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if gte mso 9]><xml>
    Normal
    0
    false
    false
    false
    MicrosoftInternetExplorer4
    </xml><![endif]--><!--[if gte mso 9]><xml>
    </xml><![endif]--><!--[if !mso]>
    <object
         classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
    </object>
    <style>
    st1\:*{behavior:url(#ieooui) }
    </style>
    <![endif]-->
    <!--[if gte mso 10]>
    <style>
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    </style>
    <![endif]-->
    Hello.
    At my work, we use JavaMail (version 1.4.1) in server
    programs, processing mails with attached files from customers. Mostly it is
    TIFF images, but it can also be PDF
    files, and the attached files are extracted and saved for further processing.
    Sometimes, we have a problem, reading attached PDF
    files. The files get saved, but is of size 0 bytes. If I forward it, however,
    using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
    I have tried to forward it using JavaMail, but I cannot
    compose the mail parts, that fails, however - of the same reasons: I cannot
    read the them in:-)
    It looks like it's when the mail is send from a Mac.
    Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
    type is "APPLICATION/OCTET-STREAM"
    The way, I read the part, is to check if the part is an
    instance of an InputStream, and then saving into a byte array, like this:
    h5. Object
    obj = part.getContent();
    if (obj instanceof
    InputStream) {
    InputStream
    inStream = part.getInputStream();
    byte[]
    buffer = new byte[BUFFER_SIZE];
    int
    bytesRead;
    BufferedOutputStream
    outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
    while
    ((bytesRead = inStream.read(buffer)) != -1)
    outBufStream.write(buffer,
    0, bytesRead);
    inStream.close();
    h5. outBufStream.close();
    Problem
    is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
    so a file of 0 bytes are created.
    Interesting is perhaps, that debugging shows me that the
    part instance of the InputStream actually is a
    com.sun.mail.util.BASE64DecoderStream when it fails, and a
    com.sun.mail.util.QPDecoderStream
    when it works OK.
    So I have this idea, that I's a certain type of decoder
    stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
    we use java 1.6 we use the JAF framework from that one, I guess?
    Hope you guys can help?
    Thanks in advance, Per Jensen
    [email protected]

    We have two (MS Exchange) servers (from trace log):
    Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
    Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
    - the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
    But I've found out a couple of interesting things:
    1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
    2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
    <START OF DUMPED FILE>
    This message is in MIME format. Since your mail reader does not understand
    this format, some or all of this message may not be legible.
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: text/plain;
         charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    (The body text here)
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="first_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="first_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
    ...(and so on)
    DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
    MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4
    Content-Type: application/applefile;
         name="second_attachment.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
         filename="second_attachment.pdf"
    AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
    egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
    Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
    ...(and so on)
    <END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
    As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
    PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
    (...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
    MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
    MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
    ------_=_NextPart_000_01C9A8A2.19479FE4--
    A10 OK FETCH fuldført.
    A11 FETCH 1 (BODY[TEXT]<40336.16384>)
    * 1 FETCH (BODY[TEXT]<40336> {0}
    20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
    A11 OK FETCH fuldført.

  • Read filename of email attachment for sender mail adapter

    Hi All,
    We have a requirement to read filename of email attachment received from Sender email adapter and send details to SAP by Proxy call.
    Can we retrieve the filename of email attachment ?
    Any help on this will be really useful.
    Regards,
    Ashish

    Hi,
    >>>Can we retrieve the filename of email attachment ?
    Please see the below link, it might be useful to you.
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
    Regards,
    P.Rajesh

  • I HAVE A PROBLEM TO OPEN PDF IN PAGES WHICH ARE ATTACHED WITH EMAIL,SOME ONE CAN HELP ME.?i,m using MINI I PAD 4G wi-fi

    I CAN,T OPEN PDF FILES IN PAGES WHICH ARE ATTACHED WITH EMAIL OR CAN,T SHARE PDF FILES WITH PAGES

    Install free Adobe Reader.
    https://itunes.apple.com/sg/app/adobe-reader/id469337564?mt=8

Maybe you are looking for

  • Copying and pasting Garageband track data from a project file to another?

    I am recording my music using an iBook and Garage band in the room where I havemy musical instruments and MIDI equipment. Then, using a one Gb Kingston memory stick, I move the files to my brand new 24" Intel iMac in another room. When the files are

  • Can't get itunes to create playlist using songs on ipod

    How do I integrate the songs on my ipod with the itunes on my new computer without losing my downloads? I successfully authorized my new computer (Windows XP) for my itunes account. When I access my account on the new computer it shows all the songs

  • Performance problem with MERGE statement

    Version : 11.1.0.7.0 I have an insert statement like following which is taking less than 2 secs to complete and inserts around 4000 rows: INSERT INTO sch.tab1           (c1,c2,c3) SELECT c1,c2,c3    FROM sch1.tab1@dblink   WHERE c1 IN (SELECT c1 FROM

  • Don't want iCal filling in Lunch or Dinner times

    If I create an event with the word lunch, iCal automatically assigns it a 12noon time.  If I include the word dinner, it assigns 8pm.  I want it to do neither.  I usually enter lunch or dinner appointments without a time, as it hasn't been set yet. 

  • Lift and Stamp - one image only

    I can get Lift and Stamp to work on JPEG images, but it only updates one image. So even if I select 10 and then stamp, only the image with the "thick" white border is updated. I've read lots of complaints on lift and stamp usability, but i think I'm