Mail-Adapter adds ".bin" to filename of attachment

Hi!
I'm sending mails with a dynamic generated filename using the mail-adapter and mail-package. The file extension of the attachment should be ".txt" and the content-type should be "application/EDIFACT"
When I change the content-type of the attachment in my adapter module by
TextPayload attachment = msg.createTextPayload();
attachment.setName("something_dynamically_generated.txt");
attachment.setContentType("application/EDIFACT");
The content-type is changed properly, but the file extension ".bin" is added.
The result is in my example:
something_dynamically_generated.txt.bin
How can I stop XI from extending my filename?
I tried with the MessageTransformBean, but it had no effect.
Best regards,
Daniel

Hi Sudharshan,
we upgraded from SP15 to SP18, then the problem occured no more.
I created the attachment in an adapter-module for the mail adapter. Sample code:
TextPayload attachment = msg.createTextPayload();
attachment.setContentType("Application/EDIFACT");
attachment.setName("SomethingDynamicallyGenerated.txt");
attachment.setText(string_which_contains_the_new_payload);
msg.addAttachment(attachment);
It seems that the mail adapter checks now if a filename extension is given. If this is the case, it adds no extension by itself.
I tested different configurations like mail package and variable transportbinding / adapterspecific attributes, it worked every time.
Best regards,
Daniel

Similar Messages

  • In Receiver Mail Adapter ,how to ignore SOAP Header attachment

    HI Folks,
    Am using Receiver Mail Adapter and am getting 2 attachments.
    1. one is Soap header which contains Control records
    2. payload
    I want only Payload as attachment and need to ignore SOAP Header(AT00001.xml).
    The configuration is as below:-Trasport protocol : SMTP
                                                Message Protocol: XIALL
    Please provide Inputs.
    Thanks & Regards
    Ashok Reddy

    Hi Gagandeep,
    Scenario: File------>mail( Bypass scenario)
    i had posted file in FTP and am getting attachment properly but aditionally am getting ATT00001.xml as SoapHeader.this i need to ignore.
    PFB Module Parametrs i used:
    localejbs/AF_Modules/MessageTransformBean   LocalEnterpriseBean    transform
    Modulekey                      Parameterattribute                        value
    transform                      Transform.ContentDisposition            attachment;filename=”Pocr_860.txt”
    transform                     Tansform.ContentType                       text/plain
    Regards
    Ashok

  • Mail adapter - how to get rid of attachment

    Hi XI Forum,
    I want to send a simple mail notification to a user, that his/her data has passed through XI. In that connection I don't want the default behaviour of the mail adapter, which is to attach the message payload to the mail.
    In other words - I want to send a mail with NO attachment.
    How do I accomplish that ?

    Hi,
    Change the Message protocol to 'XIPAYLOAD'. Make sure you uncheck the 'Keep Attachments' checkbox. This should send the email with the xml message in the body of the email with no attachments.
    If you do not need the xml message in the body, you could use 'Mail Package' by checking the Mail Package checkbox. In this case, you need to have a mail package xml created with email id, subject and content (that could be custom text). For more instructions on how to do this, refer to Michal's weblog:
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Regards,
    Suresh.

  • Different Attachment extension(.xls,.txt) in sender mail adapter

    Hi Experts
    Is it possible to use different type of attachment extension (e.g .xls,.txt) in the sender mail adapter?
    My requirement is , the attachment in the mail adapter will be used as the main payload.So I am using PayloadSwapBean adapter module.
    Currently I am using the following module key for .xls attachment and it is working.Configuration for .xls attachment is as follows
    swap.keyName-Content-Disposition
    swap.keyname-Content-Description
    swap.keyName-Content-Type
    swap.keyValue-attachment;filename="MailAttachment-1.xls"
    swap.keyValue-MailAttachment-1
    swap.keyValue-application/vnd.ms-excel.
    Now, the attachment may be .xls or .txt file.
    Now If I want to use .txt atachment then do I need to define all these parameter again and in that case what will be my content type for .txt file.
    Your inputs required
    thanks
    Ayan

    PayloadSwapBean  will only convert the attachment as the main payload.
    Yeah for reading excel file I have a separate custom adapter module.This is not in the scope of my question..
    All I am asking , can .txt as well as .xls attachment be used in the same sender mail adapter.
    If that is possible what will be my content-type for .txt or can I remove content-type and use only content-disposition and content-description so that any type of attachment it can recognise.
    The momment I am specifying  content-type , I am making it particular  that only say .xls attachment , it will identify.
    I hope I make you clear.Inputs required
    Thanks
    Ayan

  • Non XML attachment to XML in sender mail adapter

    Hi,
    I am working with sender mail adapter and usng payloadswapbean. My attachment is non XML and I need to convert it in to XML in order to mapping. How can I do that? Can someone explain if can I use MessageTransformBean for this purpose and if so, how?
    Or any other method for doing this?
    Thanks,
    Rakesh

    Is the attachment in text format? If yes, then after the usage of PayloadSwapBean, you may try using MessageTransformBean in the same module chain. And you will be able to convert it into xml format.
    Regards,
    Prateek

  • Sender mail adapter - filter emails by attachment?

    Dear experts,
    I have a sender mail adapter that picks an XSL (EXCEL) attachment from an incoming email and converts it (with a custom adapter module) to XML.
    But now how can I make the adapter only process emails with XLS - attachments? In that Inbox I also have emails with HTML-attachments for example. And now my adapter also wants to process those messages.
    In my adapter module that makes XLS to XML I see an exception in RWB but the message still gets through to SXMB_MONI where it gets stuck with a red flag.
    Can I somehow tell the adapter to only process emails with XLS attachments?
    Or can I stop the processing in the adapter module that converts XLS to XML?
    Thank you for any input or ideas on this!
    Best regards,
    Peter
    PS: I am using this code to convert XLS to XML:
    http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns

    Hello ChizzT,
    Thank you for your idea. I went with this one and it worked.
    Best regards,
    Peter

  • How to change content-type in receiver mail adapter

    Hi,
    I have receiver mail adapter for sending XML file as attachment in the mail. My partner expects to receive mail with content-type: text/xml, but XI sends Content-Type: application/xml. Please advise how I can change content-type to text/xml.
    Thank you
    Lev

    hi,
    try MessageTransformBean
    Transform.ContentType
    http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm
    also shown in my blog:
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Security requirements on sender mail adapter

    I have set up a sender mail adapter to fetch the email with attachment from MS exchange mail server. The sender mail adapter can process the attachment well and convert it to XML format. Now I have a new requirement to determine if the email comes from a particular user. I can see the FROM field in the payload "MailMessage" But I don't know how to get the value of this field. Any idea on how to set up the message mapping? Thanks in advance.

    Before the sender mail adapter processes the attachment in the email, it need to determine the email is actaully from the business user not someone else on server. Cuz everyone can send email to the email address the mail adapter connects to, that is why this security issue comes from.
    Basically when you fetch a email with attachment, in Sxi_monitor, you can see two field in the payload, One is MailMessage and the other is MailAttachment-1. In the MailMessage, you can see all the emial header fields, such as From, To, Subject, Content etc. I need to check if the FROM field is email address we allowed. That is basic requirements. Let me knwo if you want me to explain it further.
    Edited by: Bai Li on Dec 23, 2010 6:02 AM

  • Error at Receiver Mail adapter modules

    Hi,
    We have implemented a receiver mail adapter for producing Excel file as attachment.
    It is giving the error as follows:
    Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of MessageTransformBean.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MessageTransformBean..
    This configuration has worked well earlier, and suddenly it is throwing this error.
    Please let me know what might be the reson for this.
    Thank you.
    Regards
    Bhanu.
    Edited by: Bhanu Tiruveedula on Sep 15, 2009 1:00 AM
    Edited by: Bhanu Tiruveedula on Sep 15, 2009 1:00 AM

    Hi,
    I didn't use the fullstop.
    Can anybody help me in resolving this issue?
    Thanks.

  • Mail Adapter: original Attachment filename retrieval in Proxy

    Hi,
    I have a Sender Mail Adapter, and the receiver is a proxy, where I need to get the attachment and its details.
    When I execute
    attachment_filename = l_attachment->GET_DOCUMENT_NAME( ).
    it simply returns Attachment-1 etc.
    How do I get the original attachment filename?
    I am on SP16.  
    Regards,
    Puloma.

    HI
    Please refer tihs thread for mail attchments
    Re: Handling attachments of mail
    Scenario to pick the mail with its attachments into XI\Re: Infrastructure required for Mail Adapter

  • Retrieval of attachment filename - receiver mail adapter

    Hi,
    I am using the mail adapter to receive an e-mail into PI. This e-mail has an attached CSV file.
    First, I am using the PayloadSwapBean to swap the application playload to the attachment payload
    Second, I am using the MessageTransformBean to transform the CSV file into an XML document
    These are both working fine and the message is then passing into the relevant message mapping.
    However, I would like to be able to use the attachment filename in the message mapping.
    Can anyone advise how to do this for the mail adapter ?
    I've done it loads of times for the file adapter but never the mail adapter (when using attachments) so I am a bit stumped.
    Any advice greatly received.
    Cheers
    Colin.

    Hi Progirl,
    I want to dynamically set the name of attachment in receiver mail Communication Channel.
    Example: IN__9907211000004_4048454000005_20081211_01000000002643
    The first two numbers 9907211000004 & 4048454000005 I want to read it from the message
    20081211 this is the date and
    And againg this number 01000000002643 is read from message.
    I read from your response. You had created adapter module for the similar purpose. Can you share it. Since I am new to  writing Adapter Module.
    Thank You in Advance.
    Mukhtar

  • 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

  • Separate valid mail attachment in sender mail adapter

    Hi Experts,
    I am working on Mail -> RFC scenario in pi 7.3.
    Our channel is able to process new mail having valid attachement (i.e. .xml) file.
    But sometime attachment contain invalid format also like pdf, or .txt file with valid attachment.
    With these types of mail, channel throw error and do not process it. But my requirement is to separate the valid attachment and process it and delete it from mail box.
    What our channel is doing is it skips these kind of mails and only change the status from unread to read.
    Regards
    Jitender

    Hi Jean ,
    I got the same issue too, the Scenario is MAIL ->FILE . Mail Sender Adapter picks up the 1 PDF attachment and saves in network folder successfully but not multiple attachments of a  mail.
    These are the setting in Module configuration I made:
    1. The IMAPS was used in Mail Sender Adapter : imaps://10.192.101.16:993/Inbox
    *IP address of the Mail Server was got from the Admin )
    2. Ports : 143, 993 are opened for the Mail Server to access for XI SERver ( Raised an Ticket to open Ports of Mail server :NZTxxx.dknz.nzcorp.net)
    3. As the attachment was only in PDF : Added swapbean in Module tab as below :
    Process Sequesnce :
    -Make sure: AF_Modules/PayloadSwapBean Modul key : TRANSFORM is added before sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    -And under Module Configuration select : TRANSFORM as Module Key and add >
    swap.keyName Content-Disposition
    swap.keyName Content-Description
    swap.keyValue attachment;filename='MailAttachment-1.pdf"
    swap.keyValue MailAttachment-1
    -IF you get to know how to fetch multiple attachment , Please update.
    Thanks,
    Vara

  • Multiple attachment in sender mail adapter with PI 7.11

    Hello all,
    I've got a scenario MAIL -> PI -> MAIL.
    In my sender adapter mail, i have two attachment.
    From what i've saw on different thread, it wasn't possible to handle this case in standard with PI 7.0.
    Is it possible now with PI 7.11 ? Or must i develop a specific module for that ?
    Thank you.

    Hi Jean ,
    I got the same issue too, the Scenario is MAIL ->FILE . Mail Sender Adapter picks up the 1 PDF attachment and saves in network folder successfully but not multiple attachments of a  mail.
    These are the setting in Module configuration I made:
    1. The IMAPS was used in Mail Sender Adapter : imaps://10.192.101.16:993/Inbox
    *IP address of the Mail Server was got from the Admin )
    2. Ports : 143, 993 are opened for the Mail Server to access for XI SERver ( Raised an Ticket to open Ports of Mail server :NZTxxx.dknz.nzcorp.net)
    3. As the attachment was only in PDF : Added swapbean in Module tab as below :
    Process Sequesnce :
    -Make sure: AF_Modules/PayloadSwapBean Modul key : TRANSFORM is added before sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    -And under Module Configuration select : TRANSFORM as Module Key and add >
    swap.keyName Content-Disposition
    swap.keyName Content-Description
    swap.keyValue attachment;filename='MailAttachment-1.pdf"
    swap.keyValue MailAttachment-1
    -IF you get to know how to fetch multiple attachment , Please update.
    Thanks,
    Vara

  • Sender Mail Adapter - forcing content as an attachement

    Hi all,
    We are using the Sender Mail Adapter to pull emails from the inboxes of some users of an exchange server.  We use the Mail Package option.
    We have noticed that the content of the emails are by-default added as attachments when there are no real attachments to the emails.  However the content is not added as an attachment when one or more attachments are present in these emails.
    Is there a way of forcing the Sender Mail Adapter to always add the content as an attachment and keeping the other attachments as well?  and of course maintain the Mail Package message type as the main payload...?
    Many thanks,
    Aldo

    Hi Stefan,
    Thanks for your reply.  I am glad to hear that I am wrong again )
    In your opinion is it possible to force the Outlook Exchange server to add the content attachment every time?  I mean by doing some configuration on it...?
    The reason why we would like to do this is because when - in the content tag of a Mail Package message - we have MIME message parts that are of content-type text/html we are having problems in decoding the html back to a readable format.
    To do this we use the apache QuotedPrintableCodec Java class.
    This works fine when the content type of the message is just text/plain but we get an exception when we try with text/html.
    The exception we get is:
    org.apache.commons.codec.DecoderException: Invalid URL encoding: not a valid digit (radix 16): 13
    I don't know if this is because of the two character sets we have in the payload (utf-8 and iso-8859-1) or if it is for other reasons...
    If you could help me figure out how to forward any HTML email to another system in a readable format it would be great.
    Thanks for your support,
    Aldo

Maybe you are looking for

  • Nikon D2x and High Speed Crop

    Just an interesting observation.... With Aperture and Tiger, Nikon D2x images shot with the smaller MP High Speed Crop (HSC) mode displayed 24 extra columns/rows (depending on orientation) of pixels; thus an image that should be 3216x2136 showed up i

  • What can I do about constant beachballing and slowness?

    For the past four months my computer has been painfully slow. It beachballs constantly and for long periods of time, especially in Safari (not sure about other browsers). Sometimes all of the windows I have up go blank and appear to refresh themselve

  • Can't create a new alias

    i currently have two alias in use and still have one available, but since long time ago, when i try to create an alias,   it always return with the error "this alias is not available". im pretty sure im using correct formate because the one im creati

  • What happened to my safari/internet?

    What happened to safari/internet? I don't really know whether the problem is with my safari OR internet, but this thing suddenly just popped out of nowhere, at first it didn't really bother me.. But this thing has been annoying now, it will popped ou

  • DEBMAS

    Hi guys, with the new SEPA Direct debit functionality, we are thinking of onboarding the bank details and the SEPA mandate for Customer Domain from SAP MDM. So that means the SEPA related details need to flow from SAP MDM 7.1 (SP08) to PI to ECC. The