Javamail and bad file names in attachment

Hi all,
We are having an issue interpretting bad filenames are
in the attachments of emails received. Our application
listens to an inbox and then interprets the messages
in the inbox.We copy the attachment to the local
machine.Now some email attachments come with bad names
like with accents or japanese/chinese characters and
javamail is not able to interpret thses characters.
part.getFilename returns some weird symbols and
sometimes ?=iso-...... I tried using the decodeText
method and this does not seem to work. Infact using
this results in some good filenames being converted to
bad names. Please let me know how to go about fixing
this issue.
I really appreciate your help.
Thanks,

can you send your code for receving & sending attachment
so that i can help you

Similar Messages

  • Dynamic bad and Log file names!!

    Hi

    Hi
    I have the scenario like the data files would be passed as parameter to the mapping , and the mapping would have the premapping procedure which would change the file name in the external table definition. This works fine. But the one more issue I have is that, I would like to change the bad file,log file and discard file name also through this procedure. In other words, for each incoming data file I would like to create a bad ,log and disc file.So How do I accomplish in the present procedure which does the following alter table statement
    execute immediate 'alter table '||p_table_name||' location('''
    ||p_file_name||''')';
    Any suggestion would be greatly appreciated
    Thanks
    Balaji

  • Bad file name or volume name error

    Hello All,
    I am currently in a session when all of the sudden, as I arm a track to record and press record i get an error that states..
    "Bad File Name or Volume Name (perhaps zero length)
    Result Code = -37"
    Anybody know how to fix this?

    Same message here whenever i try to do a "save as". I've already repaired permissions. Any other ideas?
    JP

  • Change file name in attachment -- Sales Order

    Hi guys,
    I have to change the file name in attachment (sales order ), a pdf sent via va02 Extras/output/header/edit to mail defined in xd02.
    I used the standard program /SMB40/RVADOR01,
    what I have now : in attachement file is like 'SAPLSTXBE /20080102/174052.pdf'
    in object mail 'SAPLSTXBE /20080102/174052' .
    What can I do for changing those values?
    need urgent help please
    thanks.

    I have tried this but that doiesn't work:
    Changing the subject for email order confirmations
    An output type ZEXT was created to send emails of order confirmations to a certain distribution list in PDF format. (See the SAP Exchange Connector Implementation Documentation for details on this setup.)
    The following code and config was implemented in order to change the email subject line.
    Configuration for ZEXT (External order confirmation by email)
    Transaction: V/30
    General Data: Access Seq: 0009 (SalesOrg./Cust./Order type), Access to Conditions CHECKED.
    Replacement of text symbols – Program: ZEXT. Form routine: TEXT_SYMBOL_REPLACE
    Default Values: Transmission Medium: 5. Communication Strategy CS01.
    Mail and Titles: &KUNNR&:Order &VBELN&
    Processing Routines: Program: RVADOR01, Form Routine: ENTRY, Form: YPCC_ORDCONF_STD
    Condition Record
    Using VV12 you need to add a condition record as applicable. Note that the Communication record must point to your ZMAIL output device and has the following entry as Text for Cover Page: &KUNNR&(&VBELN&)
    Code for ZEXT subject definition
    REPORT zext.
    Author: Kevin Wilson
    Date: 01/07/2003
    Description: This program changes the title of the email for output
                 type ZEXT. Maintain output type ZEXT using V/30.
                 The mail title and texts tab has entry:
                 &KUNNR&:Order &VBELN&
                 The general tab has entry in Replacement of text
                 symbols: Program ZEXT. Form:TEXT_SYMBOL_REPLACE
    tables: kna1.
    FORM text_symbol_replace TABLES xtlines STRUCTURE tline
                             USING xthead STRUCTURE thead
                                   snast  STRUCTURE nast.
      data: t_vbeln(10) type c.
      DESCRIBE TABLE xtlines LINES  sy-tabix.
      CHECK sy-tabix GT 0.
      LOOP AT xtlines.
        move snast-objky to t_vbeln.
        replace '&VBELN&' with t_vbeln into xtlines-tdline.
        select single name1 into kna1-name1
          from kna1
          where kunnr = snast-parnr.
        replace '&KUNNR&' with kna1-name1 into xtlines-tdline.
        condense xtlines-tdline.
        modify xtlines.
      ENDLOOP.
    ENDFORM.

  • How to overwrite a log and bad file in external table in oracle 10g

    Hi,
    I have used external table in oracle 10g.whenever use select query in external table orace internally create one log file in specified directory,
    but this log file is growing.How can i overwrite the log file(old to replace with new).I need overwrite a log and bad file in external table.
    kindly give the solutions.
    By
    Siva

    I don't believe that is possible with the LOGFILE clause, but it may be with the BADFILE clause. Here is an excerpt from the documentation :
    The LOGFILE clause names the file that contains messages generated by the external tables utility while it was accessing data in the datafile. If a log file already exists by the same name, the access driver reopens that log file and appends new log information to the end. This is different from bad files and discard files, which overwrite any existing file. NOLOGFILE is used to prevent creation of a log file.
    If you specify LOGFILE, you must specify a filename or you will receive an error.
    If neither LOGFILE nor NOLOGFILE is specified, the default is to create a log file. The name of the file will be the table name followed by _%p and it will have an extension of .log.

  • Bad file name or disk name error

    I have a wedding DVD with 3 tracks and 4.6GB of info. I have the last chapter end jumps on each track returning to the main menu.
    when i go the Build and format( i am burning the image to the hard drive) it goes almost all the way and then fails with this message.
    Bad file name or disk name (perhaps zero–length); attempt to move into a file.
    Can anyone help?
    Thanks
    justin

    yes i did i'm trying it again
    thanks alot!
    justin

  • Bad file name or number

    A customer is sometimes getting the message "Bad file name or number" when selecting 2009.MAR as Time dim in an input schedule (double clicking an EVCVW formula). Unfortunately the error is intermittent; he says he gets the message 2-3 times and then it works OK. He can change it to other years / months, and he can change the Entity. 2009.MAR looks just like any other in the dim list. Anyone seen this one before? (MS7.0 SP3)

    Cecilia,
        You can verify if there is something wrong into the Time.xml file donwloaded locally on the client machine or just try to refresh dimension information on that machine using eTools->Client options menu.
    Regards,
    Mihaela

  • I can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name

    can not transfer date from one hard drive to another, I keep getting an error because I have two of the same file names and one file name is in caps and I cant change the file name. My original external has an error and needs to be reformatted but I dont want to lose this informations its my entire Itunes library.

    Sounds like the source drive is formatted as case sensitive and the destination drive is not. The preferred format for OS X is case insensitive unless there is a compelling reason to go case sensitive.
    Why can't you change the filename? Is it because the source drive is having problems?  If so is this happening with only one or two or a few files? If so the best thing would be to copy those over individually and then rename them on the destination drive.
    If it is more then you can do manually and you can't change the name on the source you will have to reformat the destination as case sensitive.
    Btw this group is for discussion of the Support Communities itself, you;d do better posting to Lion group. I'll see if a host will move it.

  • Opening a new file in photoshopcc and the file name is displayed but no white working canvas. you can see it as a layer in the layers panel and if i draw on the grey area i can see int on the layer but not on the main screen.

    opening a new file in photoshop cc and the file name is displayed but no white working canvas. you can see it as a layer in the layers panel and if i draw on the grey area i can see int on the layer but not on the main screen.

    Graphics card is the problem.
    Trying to update drivers now.
    Thanks for your help
    john

  • Information about file Id, Logical file name and Physical file name

    Hi All,
    I am testing one program. Selection screen has 3 parameters, File Id, Logical File Name and Physical file name. In Physical File name, i am giving complete file name with path. But it is giving error. Please tell me, what is File id and what all information i need to enter for logical file name and physical file name.
    Thanks
    Puneet Aggarwal

    hi,
    try using this for filename.
    parameters : p_file like rlgrap-filename.
    Thanks,
    Gaurav

  • Logical file names and Physical file names

    Hi Guys...
         Can you let me know what is the difference between Logical file names and Physical file names?
    Regards,
    Rohit

    Using Logical Files in ABAP Programs http://help.sap.com/saphelp_nw04/helpdata/en/9f/db95e635c111d1829f0000e829fbfe/content.htm
    Creating and Defining Logical Filenames
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3df8358411d1829f0000e829fbfe/content.htm

  • Proper syntax of the file name to attach files in FNDATTCH.fmb

    Can you please tell me the proper syntax of the file name to attach files in FNDATTCH.fmb ?
    i am not able to open attached document if it contains & in the file name..So i wanted to know the rules to give the file name

    This has nothing to do with the TB display.  You should repost in the computer forum

  • Can We rename BAD File name in SQL Loader

    Hi All,
    Can we rename BAD File name in SQL loader?
    If yes, how?
    Thanks in Advance,
    S

    Hi,
    You can rename the bad file before running SQL*Loader, or specify the name of the bad file using the BADFILE clause followed by a filename. If you do not specify a name for the bad file, the name defaults to the name of the datafile with an extension or file type of .bad
    Specifying the Bad File
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/ldr_control_file.htm#i1005085
    Regards,
    Hussein

  • Automate exports and imports (file names)

    Hi all,
    I will like to do a simple export and import into another schema in another database.
    I am very comfortable with the process but all i require is how to set the dump file and log file names to be the date and name of the database being exported and imported.
    For example when I do the export I want the dump file and logfile names to be exp_ORCL_230805.dmp and exp_ORCL_230805.log for database ORCL exported on 230805.
    For the import I want the logfile name to be imp_TEST_230905.log.
    I am doing this export and import on a windows xp client but the database reside on UNIX AIX boxes.
    Thanks alot

    Set up ORACLE_SID before you start the imp/exp session on the client, then you can use file=exp_%ORACLE_SID%_%DATE%.dmp etc. (Note that if your windows locale has a date format w/ whitespace you might have to write a script to get rid of it..)

  • External table log and bad files

    Hi, i have defined the following access parameters for my external table and set REJECT LIMIT to 0:
    ACCESS PARAMETERS
    RECORDS DELIMITED by NEWLINE
    BADFILE BAD_DIR:'CARDS.bad'
    LOGFILE LOG_DIR:'CARDS.log'
    NODISCARDFILE
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    READSIZE 1048576
    LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    I want to know everytime i query the external table, my log file and bad file will be overwritten or appended? i want them to be overwritten.

    Hi,
    Yeah, well, be in for a surprise here:
    "The external tables feature is a complement to existing SQL*Loader functionality."
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/utility.htm#sthref1800
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=external+table&tab_id=&format=ranked
    Have you actually read/tried anything?
    You can download an XE DB for free and play with that.

Maybe you are looking for

  • Why does Illustrator CC crash when opening files from Windows 7 64x file manager?

    This does not happen with any of my ogher CC applications; and the files open just fine when opening from directly within Illustrator. It doesn't matter if it is an AI, EPS, or PDF file. The program just crashes. What I thought was a glitch a few mon

  • Are Apple going to release a new iMac in 2012?

    I've seen posts and heard about the fact Apple may be releasing a new iMac (Ivy Bridge/Anti-reflective display etc) this year (september/october). Is this true? I want to get one but should I wait to see if a new one comes out?

  • Paypal

    Since Adobe insist on monthly payments, why make it difficult by not allowing modern payment methods such as Paypal? I have a Paypal UK account but this option is not displayed when I attempt to alter payment methods.

  • SAP router installation for VPN method

    Hi All, Can any one share me the steps to perform SAP Router Configuration with VPN method. Also what are changes i need to  make in saproutab file. Appreciate your inputs. Thanks Pradeep.

  • Satellite L350D-20D: ATI radeon 3100 with Ati Catalyst Control

    i was instaled on my Satelite L350D 20-D graphic drivers from Toshiba website But after instalaton i dont have Ati Catalyst Control Center i have ion my Program Files some Foler with instalation but this is some 0.2 MB ,,, i have now this drivers : h