File-to-Mail attachment without manipulating the payload

Hello, I have a requirement to pick a file from a file server and send it to receiver as an email attachment as-is. The key is that the system should not read the contents of the file (payload). I'm unsure how to go about this! Any help in this regard is appreciated! Thanks!

I created a Java bean to read the file name available in Adapter-Specific Message Attribute (ASMA) and set it in the payload content type. Here is the code to be put in the process() method in the Java Bean:
                        String fileName;
               Message msg = (Message) inputModuleData.getPrincipalData();
               Payload payload = msg.getDocument();
                    MessagePropertyKey mpk = null;
                    mpk  = new MessagePropertyKey("FileName", "http://sap.com/xi/XI/System/File");
                    fileName = msg.getMessageProperty(mpk);
                           if(fileName == null) fileName="mytestfile.txt";
                         payload.setContentType("text/plain;charset = \"UTF-ISO-8859-1\";" + "name=\"" + fileName + "\"");
               inputModuleData.setPrincipalData(msg);
               } catch (Exception e) {
                    throw new ModuleException(e);
               return inputModuleData;
Thanks to all those that helped me addressing the issue.

Similar Messages

  • Writing multiple arrays to a single xml file at seperate times without overwriting the previous file?

    Hi my name is Dustin,
    I am new to labview and teststand... I am trying to right multiple arrays of data to a single xml file. I can do this with a cluster but I have to create a variable for each of those arrays (21 arrays) and I was hoping to use the same variable for each array. Meaning I obtain my array of data write it to an xml file then replace that array in that variable with a new array and then call up my VI that writes that array to an xml file and write it to the same xml file underneath the first array without overwriting it. Attached is my VI I created to write an array to an xml file. Again I am wondering if there is a way to write multiple arrays to a single xml file at different times without overwriting the previous xml file.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Write_to_XML_File.vi ‏11 KB

    Hi dlovell,
    Check the attached example. I think it may help you.
    Regards,
    Nitz
    (Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved) 
    Attachments:
    Write to XML.vi ‏17 KB

  • Deploying, ReDeploying JAR file to WebLogic EM without restarting the serve

    Hi
    Can any one help me how to re-deploy .jar file on weblogic EM with steps.
    Deploying, ReDeploying JAR file to WebLogic EM without restarting the server
    Appriciate if you provide information in steps with screenshot.
    Note: Not in weblogic 11g console.
    Thanks,
    Phani

    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10105/deploy.htm#BIHIIEIA

  • How create mail alert without triggering the event.

    1.     SR 3-4924626351: How create mail alert without triggering the event.
    We wanted to send alert mail every 10 days or 15 days or 1 month to a reporting manager of Opportunity Owner with details of that Opportunity. I don’t want to use any triggering of event like the Following. When new opportunity is created When modified Opportunity is saved etc.

    Raju,
    If you don't want to use the triggering event, you will have to do this manually.
    Manually:
    - Create a Web Link on the SR with and embed the mailto: function with the receivers email and subject and body embedded in the url (you can find this link on Google)
    - When this link is clicked, an email window will open with all the details you provide, and you can click the send button to send the email.
    - You will have to do this manually every 10-15 days or whatever is the duration
    Auto:
    - Create a time based workflow on a new Opportunity Created event
    - create a action to send an email notification to the concerned person (details in the workflow properties)
    - This workflow will auto send an email every 10-15 days to the opportunity Manager.
    The time based workflow is the best option I see. Do you see any issue/ concerns with auto generated emails?
    Hope this helps!
    Royston

  • How can I create a mail attachment without a file suffix?

    Hi,
    I'm trying to create anl attachment without a suffix.
    Here is my code:
                   TextPayload attAnlFile = msg.createTextPayload();
                   attAnlFile.setName("File");
                   attAnlFile.setContentType("");
                   attAnlFile.setText("Test");
                   msg.addAttachment(attAnlFile);
                   inputModuleData.setPrincipalData(msg);
    I get a file named "File.bin", but i need a file, which is only named "File".
    Can anyone help me?
    Thanks a lot
    BR
    Ralf

    Hi Ralf,
    Ref: Receiver Mail Adapter
    The attachements are given a .bin extension by default. To change this , the procedure is available in the Mail Adapter FAQ : 856599
    Q: Can I choose the name of an attachment in the mail?
    A: Yes. Most mail clients use some heuristics based on some MIME headers to derive the name of an attachment. The MIME headers involved in most heuristics are Content-Type, Content-Description, and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) in the adapter framework.
    Related questions: How can I set the file name of a mail attachment?
    Q: How can I set the file name of a mail attachment?
    There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
    Content-Type: application/xml; name="abc.xml"
    RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
    With this Content-Disposition header, you can set the file name as:
    Content-Disposition: attachment; filename="abc.xml"
    Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
    Content-Description: my xml file
    To avoid potential interpretation problems, it is recommended to combine the use of these headers.
    Also, the same note contains all info you wnat on the options of the mail adapter. Take a look at it.
    Regards,
    Jai Shankar

  • Unable to send mp3 with mail attachment. Zip the file doesn't work same

    Tried to send an mp3 file several times and kept getting this message. The file was only 11 mg.
    Unable to send with mail attachment.
    Your message couldn't be sent because a server error occurred. To send this message,please delete the current attachment,then re-attach.
    iMac, Mac OS X (10.7.2)
    Toad replyed try zip file (compress) I did and still got the same message

    Many mail servers cap their message sending or receiving at 4MB.  If you are sending your own work that you want distributed by someone else, check with your internet provider if they can temporarily raise that restriction and the recipient's mail server can temporarily raise those restrictions.   Better would be for both of you to be able to access a webhosting site to share the material and use some FTP programs to send the file to each other.    If it is an MPEG-3 of a commercial CD's music, we can't help you as such distribution is illegal.

  • Error in opening pdf file from mail attachment sent thru MII

    Hi,
    I am using MII 12.1.4 build(36).
    I have created a pdf file from BLS using PDF actions block and saving the file in web location as mentioned below:
    WEB://<ProjectFolder>/<subfolder>/Report.pdf
    I'm using the same file as attachment in my m a i l action block with attachment content type "application/pdf" and AttachmentContent "ImageSaver.EncodedImage" or "PDFDoc.Output".
    When i check the mail,i can see the attachment with some size of 8kb,but when I open the file i will get below error:
    "Adobe Reader could not open Report.pdf because it is either not supported file type or because the file has been damaged(for example,it was sent as an m a i l attachment and wasn't correctly decoded)"
    If I try to open the same file by exporting fit to my desktop,it opened properly.
    Anything I'm missing here?
    Thanks in Advane,
    Suresh

    Hi,
    According to below mentioned thread,this problem is fixed in 12.1.5 and above.
    Re: Attachment Content When sending PDF attachment in Send Mail Step
    Then I deployed the new patch ie SP07.
    Here there is one problem,ie in Menu page I can see the 12.1.7(Build40),when I open the workbech,it shows the previous patch 12.1.4(Build 36).Why is it so?
    All of my transactions running fine except the one which I have mentioned in my previous post.
    When I run the transaction mentioned in my previous post,it threw an excption for PDF Table Action block and the error mentioned below:
    [ERROR] Error found trying to execute action 'PDF_Table_0' Exception: [null]
    [ERROR] [PDF_Table_0] Action: Runtime threw an exception. Exception: [java.lang.StackOverflowError]
    When I can check the m a i l, I'm able to open the attached PDF file without error but without data.Is it because of the above mentioned error?
    Plz help me.
    -Suresh

  • Name of the Attachment without getting the entire message

    Hi,
    Does anybody here knows how can i list all the messages with attachments and the name of the files attached without invoking getBodyPart()? I want to use POP3 as my mail getting protocol.
    Thank's in advance
    Ivan Koji Koga

    hi , suresh
    in gi_packing_list
    do like this,
    gi_packing_list-obj_descr = XXX_<date>_<Time> .
    for file name pass parameter in obj_descr.
    Regards,
    Arpit

  • Can you delete an E-mail account without deleting the associated E-mails

    I was going to delete my Mindspring account from the mac mail, but it says that all the mail will also be deleted, or at least, that is how I interpet what is stated.   Soooo, is there a way delete my mindspring account without deleting the mail.  I am trying to take mindspring off as an option when sending E-mail
    Thanks
    Stan

    In Mail 4.6 (10.6) I'm not seeing only seeing Import Mailbox, no export. But Mail can be archived
    Note: I'm not getting the Archive option with Cmd, but I do get it with a right-click.
    Archiving mailboxes
    You can archive (create a backup copy) of a mailbox so you can retrieve messages if needed.
    To archive a mailbox:
    Select one or more mailboxes to archive.
    To select mailboxes that are next to each other (contiguous) in the list, hold down Shift as you click the first and last mailbox; to select mailboxes that are not next to each other in the list, hold down Command as you click each mailbox.
    Choose Mailbox > Archive Mailbox, or choose Archive Mailbox from the Action pop-up menu (looks like a gear) at the bottom of the sidebar.
    Choose a folder or create a new folder where you want to store the archives, and then click Choose.
    Mail archives the mailboxes as .mbox packages. If you’ve already archived a mailbox, Mail does not overwrite the existing file but appends a number to the filename to create a new version of it.
    If you need to recover messages, you can import an archived .mbox file as “Mail for Mac OS X.”
    Importing mailboxes
    If you set up Time Machine to back up files, you can use it to restore previous versions of a mailbox or a message. Time Machine deletes older backups to make room for new ones as the backup disk fills up, so older backups of Mail might be deleted.
    Message was edited by: WZZZ

  • Fixed length file as mail attachment

    Hi ,
    I am using function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send a binary file as an attachment to a mail.
    Each record in the file should be of fixed length 200. The "contents_bin"  table parameter of function module has line of length 255.
    The records are passed to this parameter.
    Using carriage return I am making each record of length 200. But the last record in the file cannot have carriage return as it will lead to an extra line in the file ( which is not accepted by receiving system).
    When I remove the carriage return from last record , its length becomes 255.
    Is there any character which I can use in place of carriage return in the  last record to mark end of file and keep last record also of length 200. Or is there any other way to make last record also of fixed length 200.
    Thanks in advance.
    Regards,
    Abhishek

    Hi abhishek,
    It may be time for a switch to CL_BCS. Here you can create an attachment object of type CL_BCOM_MIME_SINGLEPART which has a method SET_LENGTH.
    Or even simpler, use create object type ref to CL_DOCUMENT_BCS, use method ADD_ATTACHMENT where you have paremeters I_ATTACHMENT_SIZE and I_ATT_CONTENT_TEXT.
    Sorry, I do not provide the full code.
    But you can refer to [Thomas Jung's fantastic blog regarding Sending E-Mail from ABAP |http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID2126136850DB11007081130296184425End?blog=/pub/wlg/789].
    If you get stuck, please come back.
    Regards,
    Clemens

  • Send pages document as pdf attachment without including the whole document in the message

    What I am trying to do is to write a document in pages then send it as a pdf attachment which shows as a mail icon in the mail message.  One then clicks on the icon and the attached file opens.  Seems I can do it if I send it as a word doc but every time I try and send it as a PDF the whole document shows up in the email body....
    Is there something I am not doing?
    Thanks
    Bryan

    Hi Gee,
    We also tried this:
    Wrote document in Pages and used "export" to save it as a PDF document.
    Fired up Mail, clicked on add attachment and as usual we got the document in the body
    Highlighted the document and right clicked.
    In drop down menu we selected "show as Icon" and it did just that
    We then sent it to our Tablet where, believe it or not it came up as an attachment NOT in the body of the mail.
    Just shaking our heads on this on but I do really think Jerry is absolutely right so will not take any more chances and add a second page if I have to send a pdf......
    Bryan

  • How to get my mail through without opening the mail app...

    Hi
    I have a tendancy to when ive finished using with my apps on my Mac I always go to top left and press quit itunes or quit mail etc
    if i do that to mail, obviously when a email comes through i dont get it straight through unless the mail program is open (like on my iphone, if an email comes it just comes straight through)
    what im asking is, is there a way for me to get my mail through straight away whilst the mail program is open? - thing is I like things tidy and dont like all these programs left open
    also what is the point of the red X in the top left corner?, if im on a website on safari and I press the X, safari is still open isnt it, but if i click back onto safari to re open the app it just goes to the homepage
    so really what is pressing the red X on the top left and quitting the app altogether, what is the difference?

    Mail has to be open to receive the new mail notification.
    Clicking the red x button just closes the window, does not quit the application.
    To quit the application, you have to select "Quit......" from the application menu.
    When an application is open, a white light indicator will be shown under the application icon in the Dock.

  • Open Mail Attachment without having to save file

    I'm pretty sure I should be able to double click the icon for an attachment in Mail and it should open with the program from my preferences.
    I can't even right click the file, choose open with, and select what I want to open with. Mail just sits there ... no error message .. nothing.
    I can view in place, or save to downloads, or drag it to Desktop.
    Where the **** is this setting or how can I correct this. Driving me nuts.

    On my machine a single click on a Word document in an email opens the Word doc, no double click required. I can see the Word icon before I click on it, it is not just a generic icon.
    I can also right click and select the application, like you suggest you should be able to do.
    Not sure why it does not work for you though as there are no settings in Mail that I can see that would affect it.

  • IC Agent mails attachment - Drag & Drop the file from local/desktop into mailform

    Dear Gurus,
    Please help me regarding the following it's urgent please!
    We have implemented the Interaction Center, in that we have one requirement, where uses/agents wants to attach/upload the file using drag & drop (mouse) method. The standard process is there will be an attachment block where we have button called browse, using this we can attache a file. Please suggest me is there any standard option/configuration to do this, if no standard way at least guide me how to achieve this using technical expertise.
    Thank you very much and Regards,
    Niranjan

    Hi Niranjan,
    Up to my understanding, SAP is working on this requirement of bringing the drag and drop upload functionality. You can find more information in the below link.
    You Asked for it, SAP Delivers: Twenty-Four (24) Cool New CRM Enhancements!
    Regards,
    karthi M R.

  • How do I open mail attachment without having to save first

    I have an iMac with  Maverick 10.9.2 and  mail version 7.2. I am trying to switch over from my laptop to using the iMac exclusively. The laptop mail version is 4.6. In that version, when I receive an email with an attachment, there's a little icon of the attachment that I can just click on and open it. In the new version (7.2), there's no little icon. Instead, if i click on the attachment, it just shows a file name and I'm forced to choose to "save as" before I can open it. Is there a way to set up my preferences so i can see the icon and click to open without saving?
    Thanks!

    Open a message that contains attachments.
    Then hover your mouse over that line that separates the body of the message from the "To, From, Subject Line." On that line in the center, you are given a few options. Trash, Reply, Forward, and the attachments. Click on the attachments and down at the bottom of that list. You can select the "Quick Look". With the list, you can click on each attachment directly and given an option to download it.
    KOT

Maybe you are looking for

  • Multiple iPhoto libraries when I click on the iPhoto icon in the dock.

    I see four iPhoto libraries when I right click on the iPhoto icon in the Dock, but I only actually have two libraries.  The other two simply do not exist on my computer.  And when I click on the libraries that do not exist, obviously nothing happens.

  • Redologs in physical standby database

    The MRP process is started and the standby database is physical standby, which is running under managed standby. My Question is as below 1. Under managed recovery mode do we require the redo logs created on the physical standby database. 2. How does

  • Add attachments to Purchase requisitions

    Folks, In ME52N, it is possible to add attachments to a Preq. However, the specific button in the top of the screen is not available in ME51N. Is this customizable?

  • Nested table in a subtype

    Hi, A question: Is it possible to have a nested table on a subtype? If yes : How to declare the storage table for the nested table. I will be really grateful for any help here. Nina

  • Server response error in Calendar connected to Tiger Direct Deal

    I am receiving this weird server error in Mail. It seems to be connected to some sort of Tiger Direct deal. I can't close this window, and this is only happening on one of my Macs connected to iCloud. Any suggestions? Please see the screenshot below.