How to send file with original name through Mail adapter

I have to send file with original name as attachment through Mail Adapter. I am picking the file from FTP server through File Adapter. I am not using message mapping because files do not have any standard format.

Hi,
Have you solve your problem ?...
I have exactly the same scenario : pik up a file (file adapter) and send it in attachment by mail adapter without mapping (no IR)...
I activated Adapter specific paramters properties in the File adapter sender and i can see the FileName tag in DynamicConfiguration section of SoapHeader in SXMB_MONI...
I want to use MessageTransformationBean... BUT, how can i 'access' to FileName tag ???...
Thanks...
I setup modules like this :
AF_Modules/DynamicConfigurationBean 1
AF_Modules/MessageTransformBean rename
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.FileName
rename Transform.ContentDisposition attachment;filename=message.FileName
rename Transform.ContentDescription message.FileName
rename Transform.ContentType application/csv-tab-delimited-table;name=message.FileName
But my file name attachment is message.FileName....
Edited by: Emmanuel JORAND on Sep 29, 2008 9:23 PM
Edited by: Emmanuel JORAND on Sep 29, 2008 10:25 PM

Similar Messages

  • How to send File with Same name to Receiver

    HI Frnds,
    In my peoject i have one scenario,
    I have to access Orders is the name of file , available in FTP Server, i have to send same file to Receiver side with same name Orders
    Is it possible with same name dynamically??
    Regards,
    Raj

    hi,
    You have to go for variable substitution option available in receiver file adapter,but for that you have to get the file name in receiver payload.
    http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    these links are  also helpful
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    /people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios
    regards,
    ujjwal kumar

  • How to send original filename as the attachment name through mail adapter?

    Hi,
    I have a File to Mail scenario where the file is picked up from a folder in R/3 system and is sent as an attachment through mail. The requirement is to send the file unconverted and with the same file name.
    When tried without creating any ESR objects, it was sending the file with the name Untitled.xml.
    Since the filename has to be picked dynamically, I am not able to configure it through module parameters also (where we can set it through Content_Disposition)
    I tried configuring it as mentioned in the following link: [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=138084630]
    But still it is going as Untitled.xml with the whole mail package as the content of the attachment.
    Any pointers to solve this issue will be of great help.
    Thanks
    Justin

    there is no standard way so you will  have to write module beans.
    in other way:
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping - XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    Dynamic name in the mail attachment - pseudo "variable substitution" :
    XI: Dynamic name in the mail attachment - pseudo "variable substitution"
    Dynamic attachment name in receiver mail adapter

  • How to export file with original filename number suffix, but with more digits

    Is there a way to keep the original filename number suffix, but change the formatting of the number, adding leading zeros for instance?
    When I import photos from my camera I like to rename them, and give them sequential numbers, e.g. "2015-01 Hamburg 1.cr2", "2015-01 Hamburg 2.cr2", "2015-01 Hamburg 10.cr2", .. "2015-01 Hamburg 134.cr2", and so on.
    Normally when I export photos I like to keep the file names exacly as I imported them (except the extension) e.g. 2015-01 Hamburg 1.jpg, "2015-01 Hamburg 2.jpg", .. "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg".
    But sometimes I would like to export them with leading zeros, typically when adding photos to a web site or blog where there are sort mechanisms that only support simple sort algorithms based on file names, meaning the sort order of my photos with their original file names would become "2015-01 Hamburg 1.jpg, "2015-01 Hamburg 10.jpg", .. "2015-01 Hamburg 134.jpg", "2015-01 Hamburg 2.jpg".
    So I would like the file names to be "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 010.jpg", "2015-01 Hamburg 134.jpg".
    By keeping the original file number suffix I can easily go back to the original file whenever I need to, and the sort order would work even with simple sorting.
    The export Filename Template Editor gives quite advanced support for numbering files when exporting, see attached screenshot. There's support for exporting files with custom file names, and adding sequence, total and image number with padding (up to 9999/####). But those add new numbers, they do not consider the original filename number suffix. If I use the "Image # (001)" for instance, my example above would export as "2015-01 Hamburg 001.jpg", "2015-01 Hamburg 002.jpg", "2015-01 Hamburg 003.jpg", "2015-01 Hamburg 004.jpg", if those were the four photos I wanted to export, making it hard for me to trace them back to the original photo.
    I have found no way of adding such padding on the original file number.
    Does anyone know if this is possible or have suggestions for a workaround?
    It shouldn't be too hard for Adobe to support this I'd imagine.
    export pattern rename files  file_number filename_template_editor

    I do not know if you can do what you explained above, but there is a workaround to this (and a way to avoid having to do it in the future):
    In the Library module, make sure your images are sorted by Capture Date (this will put them in the right order, even with suffixes like 1, 13, etc.)
    Select all images, and then Rename them, using a Custom text followed by a Sequence number. The Custom text in this case should be the original name (such as, 2015-01 Hamburg, as in your example). Make sure the Sequence number is formatted with enough zeroes to include all the numbers in your images.
    In the future, when you rename images during Import, make sure you select the Sequence number format that will include all the needed zeroes, so you don't have to go through this again.

  • SSIS 2008 - Sending file with dynamic name using FTP task

    Hi  - Thanks for taking a look -  (I'm very new to SSIS.)
    I'm trying to create an SSIS 2008 package that does the following:
    1) Execute a stored procedure on SQL.
    2) Download the results as a CSV file to a 'local' location.  The file name is set using a variable ("User::LocalFilePath") dynamically based on the current time:
    @[User::LocalFilePath] + "GreatReportName_" + "_" +(DT_STR,4,1252) DatePart("yyyy",getdate()) + Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) + "_" + Right("0"
    + (DT_STR,4,1252) DatePart("d",getdate()),2) + "_" + Right("0" + (DT_STR,4,1252) DatePart("hh",getdate()),2) +  "_" + Right("0" + (DT_STR,4,1252) DatePart("mi",getdate()),2)
    + "_" +  Right("0" + (DT_STR,4,1252) DatePart("ss",getdate()),2) + ".csv"
    3) Transfer the CSV file to an FTP site.
    4) Delete the CSV file from the 'local' location.
    I've been able to do steps 1 and 2 so far.  However when trying the move the newly created file to the FTP site I get the error:
    "Error: 0xC002917C at Send to FTP, FTP Task: The variable "User::LocalFilePath" doesn't contain file path(s)."
    (When I set the "IsLocalPathVariable" to "False" and use a file previously created the file is correctly transferred to the FTP site.  This proves that the FTP details are correct and that the "RemotePathVariabe" is working
    correctly.)
    I have set the variable ("User::LocalFilePath") to "EvaluateAsExpression" in the variable properties.
    Can anyone help?
    Many Thanks,
    UnoT

    Hi Vaibhav,
    Thanks for your response.  I set the "DelayValidation" to "True".  However
    that didn't make any difference.
    I added in all the breakpoints, but it didn't give any results (I may be doing this incorrectly?):
    Any other suggestions?
    Thanks,
    UnoT

  • There is no 'Save as' under the file menu.  How do I save a file with another name?

    Numbers help refers to the 'Save As' function in the File menu.  My version (latest) does not have a 'Save As' function.  How do I save a file with another name?

    Ross Millard wrote:
    Badunit. You have an original file and an edited file. Now you duplicate the edited file and save it with a different name. Now do you have to go and delete the changed file from which the duplicate had been made? And.... is the original still unchaned... still original?
    Ross,
    For the situation you describe, Apple has provided Duplicate and Revert. Use File > Duplicate to reach this menu:
    Regards,
    Jerry

  • In Pages how do I save a file with another name

    In Pages how do I save a file with another name?

    I don't know if there is a less cumbersome way to do this (I'm still pretty new to Lion) but This is what I do - since "Save As" seems to be gone with Lion.
    I create a duplicate document - then click the red button to close the document - and a dialog box pops up and asks if you want to save the changes - I change the name in there and then save the file under the new name.
    You can also save the copy to the desktop - get info - and then change the name if the finder window.
    I copied this from the Pages help area. These help instructions were created pre-Lion I'm sure.
    Saving a Copy of a Document
    If you want to make a copy of your document—to create a backup copy or multiple versions, for example—you can save the document using a different name or location. (You can also automate saving a backup version, as Automatically Saving a Backup Version of a Document describes.)
    To save a copy of a document: 
    Choose File > Save As and specify a name and location.
    The document with the new name remains open. To work with the previous version, choose File > Open Recent and choose the previous version from the submenu.

  • How to delete one existing file before uploading a file with same name?

    Hello everybody.
    I am uploading a file to Tomcat server. But, the problem is:
    i want to delete an existing file in the server, if i upload a fresh file with same name. In other words, "First check for the file with the same name in the server. If it exists, then delete existing file in the server and upload fresh one". If such file doesnot exist, then upload the file to server.
    I have given deleteonExit()
    but, for the first time when user is uploading, i want to check for the file with same name in the server.
    i am pasting the code here. please help:
    <!-- uploading the file -->
    <%
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    String contextRootPath = this.getServletContext().getRealPath("/");
    contextRootPath=contextRootPath.concat("uploaded");
    String file = new String(dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
    // Create a directory; all ancestor directories must exist
    File outputFile = new File(contextRootPath, saveFile);
    var=outputFile.getPath();
    outputFile.createNewFile();
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=\"");
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    FileOutputStream fileOut = new FileOutputStream(outputFile);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush();
    fileOut.close();
    outputFile.deleteOnExit();
    %>Please help. Thanks for taking time.
    Regards,
    Ashvini

    Thank you MartinHilpert,
    I have one more doubt,
    I am uploading the file to one folder called "uploaded". Before uploading a fresh file, i want to delete all existing files in that folder. IS that possible ?? If yes, can you please tell me how to do that ??
    Regards, Thanks for your time.
    Ashlvini

  • Sum Encrypt does not recognize a copy of a file through linux. How decrypt this file with Sum Encrypt?

    Sum Encrypt does not recognize a copy of a file through linux to Mac 0S9. How decrypt this file with Sum Encrypt?

    Hello, and welcome to Apple Support Communities!
    I am not familiar with the program that you list, however files in OS 9 use things called Resource Forks (rather than file extensions) for filetype and creator.
    If you sent a file through Linux these resource forks probably got stripped and now the file is nothing to your Macintosh.
    It is best to BinHex your files (.hqx) before leaving the HFS file system so that their resource forks are preserved.
    Regards,
    Ryan

  • Static Files with same name. How does apex determine which files to serve?

    Hello, I'm using apex 4.2.1.00.08 and I cannot figure out how apex manages the static files and cannot find any help in the docs (other that some high level UI description).
    The application is serving some file and I cannot find which one it is in any easy way.
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen as
    SELECT *
    FROM wwv_flow_files
    WHERE flow_id = 0;
    and can apparently only be deleted using "SQL Commands" inside apex.
    the URL called is something like
    wwv_flow_file_mgr.get_file?p_security_group_id=13498126233076320&p_fname=myfile.css
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.
    apparently files linked to flow_id 0 have precedence over all the other files ...
    Thanks for clearing up a bit of "fog" on this issue.

    VC wrote:
    Go to that application > shared components > Static files you should see the file.the problem is that there are multiple files with that name, and that sometimes the file being served is linked to application "0" and it doesn't show in the "shared components" interface ...
    I have a workspace where there are several files that have the same name, and I cannot understand how apex figures out which one to serve, and also don't understand what is value of associating a file with an application.Static files can be uploaded to apex with optionally associating with an application within that workspace.
    Files associated with an application are referenced using *#APP_IMAGES#*
    Files not associated with an application are referenced using *#WORKSPACE_IMAGES#*I referenced with #WORKSPACE_IMAGES#, but now I see that if I use #APP_IMAGES# the URL generated will also contain the application ID. This would help to discriminate between different files with the same name but linked to different applications ...
    There are files associated with application 0, which don't appear to show up in the "shared components", but can be seen asWhy are you particularly interested in application 0?Because somehow APEX puts the files that I uploaded there ... they can be seen selecting from wwv_flow_files. Do they take precedence over all other files with the same name?
    Filename is unique for the given workspace[and application]I disagree. I have multiple files with the same name ... the root of this problem ...
    so apparently the only parameters that matter are the workspace and the file name. The associated application is irrelevant.How is your static file referenced??
    But not always, try associating an static file with and application and reference it using #APP_IMAGES# instead of #WORKSPACE_IMAGES#
    See
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/concept_sub.htm#BEIDCGAJ
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35125/ui_file_manage.htm#HTMDB06011
    Thanks, but the documentation doesn't give much details ... apparently files referenced with #WORKSPACE_IMAGES# can still resolve to files linked to specific applications ... I would like to understand the actual workflow for the various cases (file references with APP_IMAGES, referenced with WORKSPACE_IMAGES, file associated with the application, with another application, with no application, with application "0" ...).
    Also, I find it somewhat misleading that you can have files associate with applications that don't exist anymore (e.g. have been deleted).
    Edited by: GChierico on Apr 11, 2013 2:16 PM

  • Downloaded a music file which originally played through my playlist, but now says it cannot find the original file associated with it.  Takes me to the root directory, but this does not help.

    Downloaded a music file which originally played through my playlist in iTunes but now it comes up with a message that the original file cannot be located although the file appears in the play list.  It asks if it should search for the relevant file which takes me to the root directory and is no help.

    Hello gordon175
    You would need to locate the song on your computer to link them back up so it will play. If you cannot find it and it was purchased from the iTunes Store, you can delete the track and download it again for free.
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/ts1408
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht2519
    Regards,
    -Norm G.

  • How can I see file with chinese name in Sunray USB storage?

    hi, All
    I installed Sunray4u3 on Solaris0805. the application server is win2003EE.
    I accessed usb storage from win2003, but I can only see files with English name , and could not see files with chinese name. Why? who can help?
    best regards
    xiong wei

    You might want to make sure your credit card is listed in the billing information associated with your Apple ID (see http://support.apple.com/kb/ht1918).
    Also, to change the From name that appears when you address emails on and iOS device, go to Settings>Mail,Contacts,Calendars...tap your iCloud email account, tap you iCloud account at the top, tap Mail at the bottom, then enter the name you want to use in the Name field at the top.
    To change the From name on your Mac Mail, go to icloud.com, sign into your account, open Mail, click the gear shaped icon on the bottom left and choose Preferences, go to the Accounts tab and enter the name you want to use in the Full Name field and click Done.  Then quit Mail on your Mac and re-open it.  Your new From name should now appear in the drop-down list when you compose a new email.

  • File-File with same name

    I had a requriment where I need to move files from one directory to another.There is no tranformation in data.So I haven't created any IR objects.But I want the target file with the same name as  source file.I can't use any udf as I haven't implemented any mapping.Plz suggest how can I acheive this.

    Hi,
    This blog is just for you.
    [How to send any data (even binary) through XI, without using the Integration Repository|How to send any data (even binary) through XI, without using the Integration Repository]
    Just make sure that you specify File Construction mode as Create.
    What ever you specify in File name in Receiver adapter won't matter, your directory should be different than sender.
    Regards,
    Anirudh.

  • How to send SMARTFORMS output as attachment through?

    how to send SMARTFORMS output as attachment through e-mail?
    after executing SMARTFORMS how to send that output via e-mail.
    Help me.
    thanks
    surya.
    Moderator Message: Please search for available information first
    Edited by: kishan P on Nov 7, 2010 7:19 PM

    hi Vinod,
    Can you please tell me how you have zipped the file.
    I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
    I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
    What I need on the whole is just to reduce the size of the file.
    form ZIP_FILE .
    DATA: lt_data TYPE TABLE OF x255,
          lt_textdata TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
    DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
    *DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
    DATA: lv_file_length TYPE i.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    CREATE OBJECT lo_zip.
    Read the data as a string
    clear lv_content .
    OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
    READ DATASET lv_dsn1 INTO lv_content .
    CLOSE DATASET lv_dsn1.
    lo_zip->add( name = 'sample.TXT' content = lv_content ).
    lv_content = lo_zip->save( ).
    *clear lv_content .
    Conver the xstring content to binary
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = lv_content
    IMPORTING
    output_length = lv_file_length
    TABLES
    binary_tab = lt_data.
    OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT lt_textdata INTO ls_data.
    TRANSFER ls_data TO lv_dsn3.
    ENDLOOP.
    CLOSE DATASET lv_dsn3.
    IF sy-subrc EQ '0'.
        MESSAGE s999(zfi_ap_gl) WITH text-t10.
      ENDIF.
    Can you please help.
    Thanks Aravind

  • How to attach file with an email in travel and expenses

    Hi Experts,
    I am new to sap cloud application studio.
    We have requirement that need to attach any type of files in the mail,
    I have gone through this : How to send an email with attachments in SAP Cloud Application Studio
    But compilation error at import AP.FO.ACTIVITY.GLOBAL., so not able to work with that lines of code.
    I am using these lines of code to send email.
    EMailUtilities.SendEMail(lang, bcc, cc, toAddress, htmlContent, from name, subject);
    So am not able to getting how to attach file with this code.
    Please help me regarding this.
    Thanks & Regards,
    Preethi Ande

    Hi Preethi,
         I am trying to send mail from custom BO in Travel on Demand System.I am getting  compilation error.please look into the attached screenshot for the code.
    Please assist me on this,                                Thanks in advance
    regards,
    Sendhilazhagan

Maybe you are looking for