Mail Sender Adapter - Attachment Handling

Hello,
I 'm using XI 3.0 SP 14.
I have problems with my Mail-Sender-Adapter.
The mails, I fetch, have an xml-attachment which
represents an IDOC-structure (ORDERS.ORDERS05).
I want to sent this attachment as payload to an SAP-System.
The problem is now, that I have 2 Payloads (SXMB_MONI).
One for the normal email-body and one for my original
xml-attachment. See below:
- <SAP:Payload xlink:href="cid:[email protected]">
  <SAP:Name>MailMessage</SAP:Name>
  <SAP:Description>mail message</SAP:Description>
  <SAP:Type>Application</SAP:Type>
  </SAP:Payload>
- <SAP:Payload xlink:href="cid:[email protected]">
  <SAP:Name>MailAttachment-1</SAP:Name>
  <SAP:Description>mail attachment</SAP:Description>
  <SAP:Type>ApplicationAttachment</SAP:Type>
  </SAP:Payload>
  </SAP:Manifest>
  </SOAP:Body>
The XI Runtime Workbench (SXMB_MONI) takes (in my case)
the wrong one (email-body-attachment) and gives me
an parsing error. (Error occurs at my IDOC-Receiver-Adapter)
Now my question:
Can I remove the email-body-attachment, so that
the further processing works with my xml-attachment?
Or how can I resolve my problem.
best regards
Marcel Reichert

Hi Marcel,
use the PayloadSwapBean module to get the attachment as main payload.
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
As parameters use:
swap.keyName = payload-name
swap.keyValue = MailAttachment-1
Regards
Stefan

Similar Messages

  • XI mail sender adapter attachment mapping.

    I have created a MAIL->XI->RFC scenario.
    I have configured sender mail adapter with XIPAYLOAD message protocol.
    I have created RFC function which need an attachment as an input parameter.
    When I send an email with attachment, my mail adapter separates the input message into MailMessage and MailAttachment payloads. I can do mapping of the MailMessage payload but I need map the attachments to as input parameters of RFC function.
    I have read several webblogs about this problem. But I can not use them in this scenario. I have found one webblog with description of MessageTrasferBean  module and XSL mapping directli on adapter module but I am not familiar with XLST mapping and did not know how to use it to transform the attachments.
    Any help will be appritiated.
    Thanx
    Peter

    Hi,
    Am trying the same scenario as you did.
    Can you guide me step by step how to read , validate and extract data from attachment.
    Am stucked in reading the attachment now.
    I can able to get mail but not attachment.
    Can you tell the steps that you did.
    Thanks in advance,
    Sakthi

  • SOAP Sender Adapter Attachment Handling in Response message

    Hi Experts,
    I have a SOAP <> XI <> Proxy scenario where an external WS client sends a SOAP request and receives a SOAP response along with an attachment.
    The problem is that the WS client is unable to retrieve the attachment from the SOAP response although the SXI_MONITOR shows both the payload and attachment beign sent out. In the SOAP sender I 'DO NOT' tick the 'Keep Attachment' parameter.
    If I tick the 'Keep Attachment' parameter, then the payload and attachment both goes as attachment.
    I need help in writing an adapter module which would ensure that the payload remains as the main payload and only the additional attachment goes out as an attachment.
    Regards,
    Shobhit

    Hi Shobhit
    You can refer this generic guide
    How to create adapter modules for J2EE engine
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    How-to create a web service with attachments (SOAP With Attachments)
    How-to create a web service with attachments (SOAP With Attachments)
    Rename Attachment Adapter Module
    Rename Attachment Adapter Module
    Hope this will help
    Thanks
    Gaurav

  • IMAP-Mail sender adapter handling with read messages in mailbox

    Hi,
    (PI 7.0)
    we have a "funny" situation:
    We are using imap-mail-sender adapter polling a mailbox.
    Sometimes there are read messages in mailbox so the adapter cannot read these messages.
    When we sort all read messages and we mark e.g. the second message in list as not read, the adapter polls fetch the first (already read) message and afterwards the not-read message and afterwards no other message is read.
    I think this behaviour is wrong because pi should not handle an already read meassage.
    Does anybody know this problem?
    Or is it a problem of the mail-server (Exchange 2003)?
    Thanx and regards
    Wolfgang

    Hi,
    thanx for your answer.
    The default behaviour of imap is "only fetching unread message" (s. FAQ of mail adapter)...
    The mail sender channel with IMAP4 fetches only the unread messages from the specified mail box in the order they are stored. Therefore, please make sure that you have some unread messages in the top of the list (if ordered by most recent on top). After a polling cycle, you can look at the status of this channel at the adapter's monitor. This should show any error if the messages are not processed correctly. Once the messages are read but not processed correctly, they remain in the mail box but are not read in the subsequent polling cycle. You must correct the problem and delete these messages using your mail client program or reset them as unread so that they can be resend.
    In our example the adapter fetchs read messages too (till the first unread one)  - and this is wrong (i think so!?).
    But I dont know if its a MS-Exchange problem.
    Regards
    Wolfgang
    Edited by: Wolfgang Hummel on Oct 7, 2009 12:20 PM
    Edited by: Wolfgang Hummel on Oct 7, 2009 12:21 PM

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • Mail Sender Adapter - read from public folder.

    Hello Experts.
    I have a scenario, where I need to read an incoming mail from a public folder, and after mapping the attachment (which is a csv) I need to put the result as a file in a shared folder.
    right now the problem is, I am not sure how to access the public folder.
    should I use one of the exchange users, and try to access the public folder?
    what should I be writing in the URL parameter in the mail sender adapter ? (imap://server/???/public folder ?)
    Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    Anyone ever did something like this and can help?
    Thanks,
    Imanuel Rahamim.

    Hi Imanuel,
    do u mean u want to pick the mail which contains an attachement from a specified folder instead of inbox?
    u can configure the URL like imap://host:port/path/PublicFolder.
    after PI received the mail. we can use PayloadSwapBean to get the attachement payload and do following message mapping.
    ur question: Also - in case I will want to switch the location of the mail to a private foler inside of the user mailbox - what is the URL parameter in that case?
    do u mean u want to pick the mail from a specified mail account? if like this, create an user for the interface only. then configure the UserName/Password in the channel.
    Regards,
    Kevin Song

  • Mail sender adapter POP server not configured for URL access

    Hi Experts,
    I have a Mail --> PI --> R/3 scenario and I am configuring the Mail sender adapter for POP3. The issue is that the POP server is not configured to be accessed via a URL and hence the URL pop://hostname/ is causing the following error at runtime:
    _1. When I use pop://Fully qualified host name/
    _Error: exception caught during processing mail message; java.net.UnknownHostException
    _2. When I use pop://IP address of host/
    _Error: exception caught during processing mail message; java.net.SocketException: Connection timed out:could be due to invalid address
    I am able to ping the POP3 server from the PI server using both the FQDN and IP address.
    Can someone please help.
    Thanks,
    Shobhit
    Edited by: Shobhit Swarup Mathur on Jul 14, 2009 9:29 AM
    Edited by: Shobhit Swarup Mathur on Jul 14, 2009 9:29 AM

    Hi Shobhit
    Check with these notes:
    804102
    xi 3.0 mail adapter with pop3 user authentication problem
    810238
    XI 3.0 Mail Adapter for POP3 may not report some errors
    also check mailserver security settings ...
    Connection refused occures when XI cannot connect
    in most cases so try checking it again , maybe some ports are not opend on the firewall
    Thanks
    Edited by: Abhishek Agrahari on Jul 14, 2009 11:44 AM

  • Mail Sender Adapter for Exchange 2007 IMAPS account

    Hi everybody,
    I have the following todo:
    I configured a Mail Sender Adapter that is supposed to fetch mails from an IMAP account.
    The mails contain text files with data to be processed by XI 3.0 SP 22.
    The mail server is Exchange 2007 and requires IMAPS. IMAP is not enough. I read the notes
    - 893590 - XI 3.0 Mail sender adapter with IMAP or POP with SSL problem
    - 856599 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 Mail Adapter
    and configured the sender apapter as follows:
    URL:                     imaps://<ip address>/owa
    Authentication method:     Plain
    User:                    <domain>\<user>
    Password:                       topsecret
    Poll Interval: 5
    The first challenge is to setup the adapter with SSL. To do so, I added the Exchange server's
    root SSL certificate in the default truststore service-ssl via the KeyStorage service.
    This is necessary, as far as I know, to successfully validate the Exchange server's trusted
    certifacate which is being transfered to XI during SSL handshake.
    Since the communication channel in RWB is in status error with following message:
    mail client job stopped completly
    exception caught during processing mail message; java.io.IOException: invalid IMAP status response; not finding * STATUS, but 001I NO owa doesn't exist.
    mail client job scheduled,
    I do not know how to setup SSL for IMAPS. I successfully tested a PING to the Exchange server.
    Are there already experiences with Exchange 2007?
    What I have to do to fetch mails from an Exchange 2007 IMAPS folder/account with a Mail Sender Adapter?
    Kind regards,
    Andreas

    Hi,
    It should be imap and not imaps.
    You can try imap://xxx.xxx.de:993/Inbox
    Make sure that port 993 is correct. If you have doubt, then you may try 143 which is default port instead of 993 in the above url.
    regards,
    ganesh.

  • Mail sender adapter: date

    Hi all
    I need to fetch the mail date during the processing with mail sender adapter. I can't find a relevant field in the Adapter-Specific Message Attributes (SHeaderFROM, SHeaderTO etc.).
    Do you know how to fetch the mail date during the processing of a mail via mail sender adapter?
    Thx
    Tobias

    Thanks for the response.
    The problem is that the mail is perhaps not processed when it is created. For example: the mail is created on 01th of april and sent to the mailbox. But the PI mail sender adapter is fetching the mail on 02nd of april. Due to the reason I can't use current date - I need the original sending date of the mail.
    Thx

  • Transport protocol SMTP in Mail Sender Adapter

    Hi Experts,
    How can I use SMTP as the Transport Protocol instead of POP3 / IMAP4 protocols in the Mail Sender Adapter.
    I am referring Note 856599 - FAQ Mail Adapter.pdf but not getting a l
    " 9. Other Questions
    Q: How can I configure my sender channel for my SMTP server?
    A: You can specify your SMTP server as URL. For example, if your
    server is called host, your URL should look like
    smtp://host:port/ "
    Regards,
    Shobhit

    Hi
    How can I use SMTP as the Transport Protocol instead of POP3 / IMAP4 protocols in the Mail Sender Adapter.
    In case of sending mail from XI you can use SMTP. To read mails you need POP3
    IMAP works for both.
    Yes in XI mail adapter receiver type. URL field you can use URL like
    SMTP://Mailhost.com
    Refer this
    The specified item was not found.
    Thanks
    Gaurav

  • Problem of encoding for mail sender adapter

    Hello, everyone.
    I have faced the problem of mail sender adapter.
    When someone send message with any content encoding (even UTF-8) and 8bit content type encoding the XI mail adapter corrupt special and foreign symbols. I checked the message for correct structure and encoding with tpcgw utility and it was fine. For example (this is what I can see in tcpgw)
    ==== Response ====
    +OK
    +OK Password required for user itra_xi
    +OK XXXXX maildrop has 1 messages (2048 octets)
    +OK 1 2048
    +OK
    +OK 1459 octets
    Return-path:
    Received: from (port=20091 helo=XXXX)
         by mx76.mail.ru with psmtp
         id 1O7UoW-0003I4-00
         for XXXXXX; Thu, 29 Apr 2010 18:34:04 +0400
    Message-ID:
    Subject: Message 29 4
    Date: Thu, 29 Apr 2010 17:33:43 +0300
    MIME-Version: 1.0
    Content-Type: multipart/alternative;
         boundary="----=_NextPart_000_0018_01CAE7C2.1D0BBA60"
    X-Priority: 3
    X-MSMail-Priority: Normal
    X-Mailer: Microsoft Outlook Express 6.00.2900.5843
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
    X-Spam: Not detected
    X-Mras: Ok
    This is a multi-part message in MIME format.
    =_NextPart_000_0018_01CAE7C2.1D0BBA60
    Content-Type: text/plain;
         charset="utf-8"
    Content-Transfer-Encoding: 8bit
    Test
    Тест
    And after processing by XI mail adapter  I have this payload (XIPAYLOAD mode using mail package)
    Test
    Тест
    The same situation with using mail package in xml document.
    Any suggestions how this can be corrected?

    I switched UTF-8 encoding during displaying of http content in tcpgw utility and all other mail clients detect it as UTF-8 and work fine. Also this problem occurs with different mail clients that are senders of the message. So it seems adapter takes each byte of cyrillic symbol (each from two) and represents it as individual symbol.
    Correct me if I'm wrong. Maybe there is some configuration somewhere allowing to correct or maybe it's possible to write module to correct.. but it's quite complicated to split correct and incorrect symbols.

  • Help requierd on mail sender adapter

    i m workin on a scenario to send email from a mail server inbox to XI.i need to configure mail sender adapter....need step by step help on that.
    regards,
    latika.

    hi latika,
    the Message Structure to be defined depends on the message protocol that you are trying to use.
    I would recommend using XIPAYLOAD. From the help link,
    <b>XIPAYLOAD</b>
    In this mode, the content of the e-mail is put in the payload of the XI message. If you do not set the Use Mail Package indicator, the information about the sender (From), receiver (To), and subject of the e-mail is lost.
    If you have selected XIPAYLOAD as the message protocol, you must make the following additional specifications under Mail Attributes:
    If you want to put the entire e-mail message including the header information (From, To, Subject) in the payload, set the Use Mail Package indicator. See the example below. The header information is included in an XML mail package format.
    <i>
    Source Structure</i>
    <i><?xml version="1.0" encoding="UTF-8"?>
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
      <Subject>Subject</Subject>
      <From>[email protected]</From>
      <To>[email protected]</To>
      <Reply_To />
      <Content_Type>text/plain</Content_Type>
      <Content>
      This is the content.
      </Content>
    </ns:Mail></i>
    Regards,
    Bhavesh

  • Xi mail sender adapter for outlook express configuration

    hi,
    can somone please tell me how to configure xi mail sender adapter for reading from inbox of outlook express?
    i keep getting errors in communication channel monitor:
    "exception caught during processing mail message; java.io.IOException: unexpected user response; read -ERR Command is not valid in this state."
    Thanks
    Tomer

    Hi,
    use below link,finish the configuration of sender mail adapter,many documents available on the same in sdn,search your self
    http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
    Cheers,
    Raj

  • Mail Sender Adapter with multiple sMIME attachments

    Hi!
    I 'm using XI 3.0 SP 15.
    I have problems with my Mail-Sender-Adapter.
    The mails, I fetch, contain a certificate and multiple xml-attachments. The xml's represent an IDOC-structure (INVOIC.INVOIC02).
    The task is to first check the certificate, and then to send each of the XML attachments separately to an SAP-System.
    1) We have twelve partner which use this e-Invoicing interface. How do I administer the certificates and do I have to create for each partner a "Sendervereinbarung"?
    2)
    The second problem is, that I have multiple payloads which have to be processed separately. How can this be done?
    kind regards and thanks a lot for your help
    MArtin

    As we have multiple xml-attachments, I guess we have a major problem anyway.
    I guess Certificate verification in the sebder agreement is done after the Module Processing of the email-adapter isn't it?
    Due to the multiple attachments we have to write a customer specific Module for the email-adapter anyway.
    I guess the only way is that the module validates the certificate against the J2EE KeyStore and then extracts the various xml attachments to a file share.
    A File sender adapter then polls the file share and the sender aggreement / receiver agreement /mapping ... process starts.
    The only question is if the file adapter works also without a sender agreement, so that the xml's are stored on the file share
    Do you have an idea, if this works? or do you see any alternatives?
    thanks alot for your help!!
    MArtin

  • Mail-Sender-Adapter, FetchReport

    Hello,
    can anyone explain me how to use the FetchReport option in the Mail-Sender-Adapter?
    In the Adapter-Audit-Protocol the Adapter I always get an error.
    The SAP-Help pages are not very helpful, an in SDN there are no articles about this.
    kind regards
    Thorsten Gawantka

    Hi Chris,
    the Definition is imported already.
    Here are the message-data:
    Message-Daten
    Attribut     Wert
    Status     fehlerhaft beendet
    Wiederholbar     Nein
    Beendbar     Nein
    Fehlerkategorie     XI_J2EE_ADAPTER_XI_HANDLER
    Fehlercode     CALL_CONSUMER_ERROR
    Start     30.04.2008 13:27:03
    Ende     30.04.2008 13:27:03
    Sender-Partner     
    Sender-Service     opx
    Empfänger-Partner     
    Empfänger-Service     
    Interface     http://sap.com/xi/XI/Mail/30
    FetchReport
    Quality-of-Service     Best Effort
    Message     5b2e4a20-16a8-11dd-c67c-00145e36a4e4
    Referenz     
    Konversations-ID     
    Version     0
    Bearbeitet     Nein
    Serialisierungskontext     
    Richtung     OUTBOUND
    Message-Typ     Call
    Profil     XI
    Verbindung     Mail_http://sap.com/xi/XI/System
    Transport     HTTP
    Endpunkt     http://op-sap-xi:8000/sap/xi/engine?type=entry
    Berechtigung     SAPPasswordCredential(PIAFUSER):password=********:sapclient=001:saplang=
    Sequenznummer     0
    Anz. Wiederh.     0
    Fehlg.     1
    Wiederh.     0
    and the audit-protocol:
    Audit-Protokoll für Message: 5b2e4a20-16a8-11dd-c67c-00145e36a4e4
    Zeitstempel     Status     Beschreibung
    2008-04-30 13:27:03     Erfolgreich     Mail: calling the module processor for channel CC_AeroDB_Mail_Send
    2008-04-30 13:27:03     Erfolgreich     MP: Tritt in den Modulprozessor ein
    2008-04-30 13:27:03     Erfolgreich     MP: Lokales Modul localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean wird verarbeitet
    2008-04-30 13:27:03     Erfolgreich     Mail: message leaving the adapter (call)
    2008-04-30 13:27:03     Erfolgreich     Die Anwendung versucht eine XI Message synchron zu senden über Mail_http://sap.com/xi/XI/System
    2008-04-30 13:27:03     Erfolgreich     Versuch die Message in die Call-Queue zu stellen
    2008-04-30 13:27:03     Erfolgreich     Message erfolgreich in Queue gestellt
    2008-04-30 13:27:03     Erfolgreich     Die Message wurde erfolgreich aus der Call-Queue abgerufen
    2008-04-30 13:27:03     Erfolgreich     Der Status der Message wurde auf DLNG gesetzt
    2008-04-30 13:27:03     Fehler     XI-Systemfehler erhalten. ErrorCode: NO_RECEIVER_CASE_BE ErrorText:   ErrorStack: No receiver could be determined
    2008-04-30 13:27:03     Fehler     Rückgabe synchroner Fehlerbenachrichtigung an rufende Anwendung: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:.
    2008-04-30 13:27:03     Fehler     Die Übertragung der Message über http://op-sap-xi:8000/sap/xi/engine?type=entry ist fehlgeschlagen, weil: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    2008-04-30 13:27:03     Fehler     Der Status der Message wurde auf FAIL gesetzt
    2008-04-30 13:27:03     Fehler     Zurück zur Anwendung. Ausnahme: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    2008-04-30 13:27:03     Fehler     Mail: error occured: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    2008-04-30 13:27:03     Fehler     Mail: error occured: com.sap.aii.af.mp.module.ModuleException: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE: caused by: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    2008-04-30 13:27:03     Fehler     MP: Ausnahme aufgetreten mit Grund com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    2008-04-30 13:27:03     Fehler     Mail: failed to call the module processor: com.sap.aii.af.ra.ms.api.DeliveryException: XIServer:NO_RECEIVER_CASE_BE:
    Now the question is, how do i define the receiver in an asynchrounious scenario? And what does the FetchReport option exactly?
    thx for your help
    Thorsten

Maybe you are looking for

  • How do I get the score for my own composition on Garage Band?

    I have composed a classical piece using a mic with my acoustic piano. I made a wonderful track as the music poured out of my fingers. But I can't get garage band  to write the track in notation. Click scissors and I get the audio region. No score to

  • Simple logic - virtual characteristic

    I'm writing a code for a virtual characteristic, but need a couple pieces to get in place. please help with the following problem: In my logic, I have an internal table itab1 whose contents are as follows: plant sale 1001 100 1001 50 2001 300 First I

  • Give me the sql lines please for the following

    This is the table empCode name managerID 1 aaaa 0 2 bbbb 1 3 cccc 2 4 dddd 2 5 eeee 1 6 ffff 2 7 gggg 4 8 hhhh 3 9 jjjj 3 I want to list the records by levels like the manager and the employee those coming under him thanks in advance param

  • Need some help understanding AUR please solved

    Still learning the command line here sooooo.... I've read and reread everything recommended regarding AUR. Somewhere I'm overlooking or missing something. The AUR users guide says to: Users can access the AUR [community] repo by adding/uncommenting t

  • How to prepare functional specs? and technical specs?

    Hi All, How to prepare functional specs and technical specs please send me if u have any documents at [email protected] Thanx in advance, Ravi Alakuntla.