Change "subject" in Receiver Mail Adapter Module

Hi all,
following the "How To Guide" I developed a Module for my receiver mail adapter. Everything works fine.
Now my question: is it possible to change the content of the mail-"subject" in the module?
Your help is appreciated.
Carmen

Hi Stefan,
maybe I should describe my problem more detailed:
My scenario is RFC-XI-Mail. I use the mail package to determine the receiver of the mail dynamically. Another thing I want to do, is to attach a file to this mail which is located on the server. So far so good.
My problem is, that the name of the file (which I need in my adapter module) changes for every mail. So what I need is the possibility to deliver it to the adapter module.
I found out that it is possible to read the payload. So my idea was to hand it over in one of the fields like "subject". But now I want to change the subject afterwards...(delete the filename).
Maybe you have another idea?
Regards
Carmen

Similar Messages

  • Receiver Mail Adapter Module Parameters

    Hello PI Experts,
    Can anyone pls provide me Mail adapter module parameter details for xml to txt file conversion. I have found a few but none of them are working, can you pls provide me some active links.
    Thanks,
    Sri

    I need MAIL Adapter module transformation parameter for converting my attachment from xml to text file -
    I have gone thro few forums and modified my comm channel, but still getting xml file as an output attachment  instead of a text file.
    Can anyone please suggest me how to change the module parameters to covert from xml file to text.
    I have added these module processing - please help.
    Processing sequence
    localejbs/AF_Modules/MessageTransformBean - Local Enterprise Bean - XML2Plain
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean - Local Enterprise Bean - Mail
    Module configuration
    XML2Plain - xml.endSeparator - 'nl'
    XML2Plain - xml.fieldNames  - Field1,Field2,Field3
    XML2Plain - xml.fieldSeparator - |                     |
    XML2Plain - Transform.Class - com.sap.aii.messaging.adapter.Conversion
    XML2Plain - Transform.ContentDisposition - attachment;filename="extract_p.txt"
    XML2Plain - Transform.ContentType - xml/plain;charset='UTF-8";name="extract_p.txt"
    XML2Plain - xml.recordsetStructure - Details
    Thanks,
    Sri

  • 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.

  • Receiver Mail Adapter - Module config

    I have to send an email with file attachment.  The structure of the attachment is complex so I have to use module config to get the correct structure.  I have the following parameters:
    localejbs/AF_Modules/MessageTransformBean   trans1
    localejbs/AF_Modules/PayloadSwapBean    swap
    localejbs/AF_Modules/MessageTransformBean     trans2
    localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean     mail
    trans1   Transform.ContentDescription   Outmail
    trans1   Transform.ContentDisposition   inline
    swap     swap.keyName    payload-name
    swap     swap.keyValue    Outmail
    trans2    COMMENT.fieldFixedLengths    1,1,9,50
    trans2    DETAIL.fieldFixedLengths    2,9,15,7
    trans2    HEADER.fieldFixedLengths   2,9,1,1,6,5
    trans2    RECORDSET.recordsetName    RECORDSET
    trans2    RECORDSET.recordsetStructure   HEADER,COMMENT,DETAIL
    trans2    Transform.ContentDescription   Outmail
    trans2    Transform.ContentDisposition   attachment;filename="mex.txt"
    trans2    Transform.ContentType   xml/plain;charset='UTF-8";name="mex.txt"
    trans2    ignoreRecordsetName   true
    I don't really understand what Transform.ContentDescription/Transform.ContentDisposition does
    When I run my scenario I get the email and mex.txt attachment,  but the contents of the attachment are still in XML format.
    How do I debug this?  Can anyone tell me what I am doing wrong.
    Lots of points will be rewarded!

    Now  I see,
    you do not have an attachment, just one file.
    In that case, do not use the PayloadSwapBean and the MessageTranformBean only once.
    Her is a description of the content conversion in MessageTransformBean:
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
    In your scenario following entry is missing:
    Transform.Class com.sap.aii.messaging.adapter.Conversion
    The ContentDescription is not necessary, the ContentDisposition (inline or attachment) help some email client to decide to display the email content inside the email window or as attachment. Most of the email client just ignore this.
    Regards
    Stefan

  • Flat file name from Sender Side Dynamically into subject of Receiver Mail

    Hi All,
             I am Using a file to Mail Scenario, My requirement is to get dynamically the file name from flat file of the Sender Side into Subject of Receiver Mail Adapter and attachment of file from the Sender Side. Can anyone help me out.
    Thanks in Advance

    Hi....
              You can write udf in the message mapping to get the Dynamic file name and map that to the subject of the receiver mail.
      DynamicConfiguration conf = (DynamicConfiguration) param.get(
              StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
          // read value
          String Filename = conf.get(KEY_FILENAME);
    Regards,
    Leela

  • How to use XML Anonymizer Module for receiver mail Adapter?

    Hi All,
             I would like to know how to use XML Anonymizer Module for receiver mail adapter so as to change the namespace to http://sap.com/xi/XI/Mail/30 from my original namespace? Thank you all in advance?

    Hi,
    This may help u:
    Replacing one namespace with another using XML Anonymizer Module
    Thanks
    Amit

  • 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>

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • Receiver Mail Adapter

    Hi All,
    I am using Receiver Mail Adapter to send mails.
    When i choose Message Protocol the mail goes. But when i change it to XIPAYLOAD the mail doesnt go.
    I cannot find any errors in SXI_MONITOR or in adapter monitoring.
    My file is in this format..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Mail xmlns:ns0="http://sap.com/xi/XI/Mail/30">
      <Subject>Mail From XI new</Subject>
      <From>kmadmin</From>
      <To>[email protected]</To>
      <Content_Type>text/plain</Content_Type>
      <Date>2006/08/24</Date>
      <Content>Test mail from XI</Content>
      </ns0:Mail>
    Tried both ways..
    XIPAYLOAD without “Mail Package”
    XIPAYLOAD with “Mail Package”
    Can anyone temme where im going wrong..or any settings which i need to do.

    Bhavesh
    <i>Am not sure which SP onwards this is applicable. But , did you select and try with MAIL PACAKGE also selcted.</i>
    Tried using both wayz..
    You dont need to create ,http://sap.com/xi/XI/Mail/30  namespace in IR.
    The mail is going now..
    just disabled
    Content_type, Date in Mapping.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Mail xmlns:ns0="http://sap.com/xi/XI/Mail/30">
      <Subject>Mail ALert XI</Subject>
      <From>kmadmin</From>
      <To>[email protected]</To>
      <Date>2006/08/24</Date>
      <Content>SQL Server Is Not Working</Content>
      </ns0:Mail>
    Thanks
    SUmit

  • Column header in receiver mail adapter

    Hi experts,
    I have a proxy to mail scenario in which I send a mail with a file attached.
    Is it possible to put column headers in the attachment, possibly without changing the mapping?
    I mean, working with module configuration in communication channel?
    Thanks
    Fabio Boni

    hi
    There are several scenario's
    have a look at following :
    /people/sap.user72/blog/2005/05/02/useful-sap-notes-for-xi
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    /people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    and for further
    you can follow
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    i hope this will help you.
    Pls : Reward points if helpful
    Vishal

  • Swapping attachment to content on Receiver Mail Adapter

    Hi Experts,
    Can I move my attachment data to content on receiver mail adapter ? I am not using Mail package or mapping. I tried using Payloadswapbean on receiver adapter but adapter generated email with attachment only with and without Payload swap bean module.
    Please let me know if it is possible without using Mail Package.
    Thanks,
    Ankit

    Hi there,
    If you want to use attachment in content, then you need to collect the entire mail content in BPM. From there you can use Payloadswap bean on receiver adapter.
    The reason behind using BPM is that the attachment is maintained only in Integration Directory. First the mapping converts the source into mail and then just before moving to receiver the attachment gets added to the mail(i.e. after mapping). So if a BPM is used then all the mail content with attachment will get transported to BPM first and then to the receiver with the above change (Payloadswap bean i.e transferring the attachment to content).
    Best Regards,
    Souvik

  • Receiver Mail adapter Content type issue

    Hello,
    I am formatting the body of the receiver mail. The body of the email  should look like below.
    Dear PI User,
    The following Interface has been successfully processed by the middleware PI system.
    Please do not reply to this email. If you need more information please contact the Super User.
    Regards,
    SAP PI Team
    The mapping looks fine and My source MT looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:MT_Mail_Reply xmlns:ns1="http://test.com/Mail/Reply"> 
    - <Reply>  [0..unbounded] 
    - <Item> [0..unbounded] 
    <MESSAGE>Dear Business User, </MESSAGE>   [0..1] 
    /Item>
    - <Item> 
    <MESSAGE>The following Interface has been successfully processed by the middleware PI system.</MESSAGE> [0..1]
    </Item>
    - <Item> 
    <MESSAGE>Please do not reply to this email. If you need more information please contact the Super User.</MESSAGE> [0..1]
    </Item>
    - <Item>
    <MESSAGE>Regards,</MESSAGE> [0..1] 
    </Item>
    - <Item>
    <MESSAGE>SAP PI Team </MESSAGE>  [0..1]
    </Item>
    </Reply>
    </ns1:MT_Mail_Reply>
    The mapping works fine without errors and I get the target message as below after mapping-
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30"> 
    <Subject>ISAP PI Interface Status</Subject> 
    <From>[email protected]</From> 
    <To>[email protected]</To> 
    <Content>Dear Business User</Content> 
    <Content>The following Interface has been successfully processed by the middleware PI system.</Content> 
    <Content>Please do not reply to this email. If you need more information please contact the Super User</Content>
      <Content>Regards,</Content>
      <Content>SAP PI Team</Content>
    </ns1:Mail>
    t
    The context of MESSAGE has been changed to Reply.
    In the adapter I still get the following error.       
    Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.af.sdk.xi.util.XMLScanException: expecting end tag: {http://sap.com/xi/XI/Mail/30}Mail, but found {}Content at state 1
    Please advise !!
    Thanks,
    Teresa
    **I changed the receiver mail adapter to not use Mail package and I receive an email without errors with the Content as mentioned above. **

    Hi Teresa,
    I think the problem is that you are using multiple "Content" tags. Have you tried to use only one?, you can concatenate all your text.
    Check the page 3 of this document to know how introduce new-line character http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5992?overridelayout=t…
    Regards.

  • Having Some unknown characters in my file of Receiver Mail Adapter

    Hi All,
            I have a unique problem, I am having special characters(  #S@u201D E" E$ u201Däu201Där 4TåE$R   D0u201CC3 u0192    c@u201DÔôETÄPu201Du201Eu20220u201D 3@u201C  ó ró#  u20ACu201C  ó# ó#  u2019 ) in text file of Receiver Mail Adapter.I am providing you a part my input text file
    1747021     000070     0001     Production Baseline     ZTAN          100A     0039     2204229-1     50     PLANT3002     Honeywell Aerospace Bournemouth - R     3212774     NOZZLE     HIS     M22     12/31/2008     01/05/2009              1.000              1.000            1.000     01/05/2009     
    1745558     000100     0001     Production Baseline     ZTAN          100A     0039     801137-1     80     304030     LUFTHANSA TECHNIK AG     45111378001     WHEEL     HIS     M22     12/30/2008     01/12/2009              3.000              3.000            3.000     01/12/2009     COOP Legacy Notes - Note Type: 07N UPDATE AS OF 11/8 SH AVS Legacy Notes - Note Type: AB 1. A QTY OF 53 NEW PARTS WERE PURGED ON 3-5-99 PER KAREN MOSS' REQUEST. PARTS ARE SUSPECT OF BEING DAMAGED DUE TO BEING STORED IN ASRS IN A METAL TO METAL SITUATION.
    1740335     000100     0002     Production Baseline     ZTAN          100A     0039     3176647-4     80     341734     SAUDI ARABIAN AIRLINES CORP     8233950     VALVE, CONTROL     Jaroslav Kral     M18     12/24/2008     12/31/2008              1.000              1.000            1.000     01/23/2009     COOP Legacy Notes - Note Type: 07N D PARTS NEED TO CHEC WITH LUPE WIN ISSUIN COOP Legacy Notes - Note Type: POG REPLCS 3176647-3 AS A MANDATORY CHANGE. 3399100-11    V17138 (TAKES -4 TO -11) 3399100-11    V17139 (TAKES -9 TO -11) 3399100-10    V17140 (TAK
    1734808     000100     0002     Production Baseline     ZTAN          100A     0039     3883240-6     80     300168     IBERIA LAE     48017888601     CONTROL FUEL     HIS     M13     12/20/2008     01/10/2009              1.000
                  1.000            1.000     04/29/2009     AVS Legacy No
    Can any one help me out?

    Hi Stefan,
    I am Using Transport Protocol as IMAP4
                     Message Protocol as XIPayload
    Connection Parameters to Mail Server
    URL  -
    .mycompany.com
    Mail Attributes
    Use Mail Package
    content Encoding   base64
    Keep attachments
    I have Used the following Modules
    Processing Sequence
    Module Name                                                                Module Type                             Module Key
    localejbs/AF_Modules/PayloadSwapBean                        Local Enterprise Bean                Payload
    localejbs/AF_Modules/MessageTransformBean                Local Enterprise Bean                Transform
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean                mail
    Module Configuration
    Module                              Parametername                           Parameter Value
    Payload                             swap.KeyName                           content-type
    Payload                             swap.KeyValue                            text/xml
    Transform                          Transform.ContentDescription       MyReport.txt
    Transform                           Transform.ContentDisposition       attachment
    Transform                           Transform.Contenttype                 text/xml

  • Dynamic attachment name in receiver mail adapter for 1 attachment?

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

  • 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

Maybe you are looking for

  • Trying to set up ereader for library books but unable to authorise computer.

    I am trying to set up a Kobo Aura ereader to borrow and read library books. I have verified my Adobe ID. Each time I try (I installed, uninstalled and reinstalled Adobe Digital Editions) I am unable to authorise my Windows 7 computer. I get the follo

  • Pure sql in DB adapter

    Hi All, Here is my scenario: I wnat to take teh dat from the database tables and generate teh reports in BAM. Al;ready I have SQL queries to generate the report. I want to pool the db tables for every 2 mins and generate the report . My question is :

  • 2012 Macbook Pro freezing up and giving the pinwheel all the time.

    Last week my macbook pro started freezing up whenever I am doing something.  Whether i am just surfing the web, going through my folders, or in photoshop it just starts freezing up.  When i have pandora the audio will cut in and out saying that shock

  • HT201317 can i choose which devices all my photos get pushed to?

    In iCloud, is there a way I can make the sharing go only one way? For example, from my iPhone to my Macbook, but not my Macbook to my iPhone?

  • Problems with Importing / Exporting Keywords and Meta Datas

    Hi to all! I recently upgraded to Aperture 3 and upgraded my referenced library. Today I opened the Keyword HUD and noticed some keywords splattered in my list, which seem to be any older ones, since the new numbering indicated that they are not appl