StringIndexOutOfBoundsException from Mail Adapter

Hi,
We have configured a sender communication channel for the mail adapter, but when we receive an email we get the following error message:
<i>error occured: exception caught during processing mail message; java.lang.StringIndexOutOfBoundsException: String index out of range: -1</i>
Our configuration is the following:
Transport Protocol:  IMAP4
Message protocol:    (tried both)
URL:                 imap://exchangeServerHost
The emails we tested with are plain/text emails. We tried both with an XML document as the main body of the email and with the XML document as an attachment, but the error remains the same.
If anyone has some ideas on how to resolve or troubleshoot this it would be appreciated.
Thanks in advance,
Erik.

Thanks Ranjit...I fixed the error. It was the URL I was missing the inbox from the URL.
Check the following thread:
Email Adapter Throwing Error
Message was edited by:
        Alaa Qasem

Similar Messages

  • What kind of data is taken from mail adapter to file adapter

    hai
    i am learning mail to file adapter can u tell me in real time where it is use,
    well what data we will transfer from mail to file.

    sandeep,
    we are using the sender mail adapter to receive mails (IDOCS) from a Exchange server
      when a sales person gets PO thrugh mail then he sends this Po to Mainframes then we use mail to file.
    similarly we can have many situations to useit.
    Message was edited by:
            Sreeram Reddy

  • Mail adapter ignores decimal point

    Message going out from Mail adapter ignore decimal point. One of the attibutes in xml file has a value "1.0". When I check the message in SXI_MONITOR -> Call adapter -> Payloads -> MainDocument, attribute value is "1.0". But when file is received by receiver atribute value is "10". Can any one give some advice how to fix this issue?
    Thanks
    Ranji

    Hi,
    I hope , in general mail adapter may not ignore the decimal points , please check in mapping itself..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
    Regards
    Chilla

  • Handling multiple xls , xlsx attachments in mail adapter

    We have a (sender)mail with excel attachment scenario which is converted to an Idoc.
    Currently we are using ''PayloadSwapBean" for converting .xls attachment as main payload which is being read using an adapter module.
    PFA the screenshot.
    We have a new requirement as below
    when there are additional attachments in e-mail only the relevant template (MS Excel file) loaded.
    Handle all MS Excel format: .XLSX in addition to existing .XLS
    ability to process multiple excel file in a mail
    Kindly suggest ways to handle it.
    Regards,
    Kesava

    Could you please provide the location of  PayloadSwapBean file (.Ear,.jar,.class and also provide AL11) Transaction  in PI 7.31.
    Brief Background:
    We have a requirement to read multiple attachment from mail adapter. PayloadSwapBean is capable of reading only single attachment. We would like to see the code of PayloadSwapBean and modify accordingly to meet the requirement.
    If there is any alternative could please suggest the solution for read the multiple attachments in sender mail adapter.

  • Read multi-tabbed excel file attachments from Sender Mail Adapter.

    There is a need to read excel attachments from incoming email to a
    mailbox. We know we can use Sender Mail adapter to easily read .xml, .txt
    or .csv attachments.
    For excel attachments we know from SDN that you have to write
    adapter modules to handle excel. However the excel file we need to read has
    multiple worksheets(tabs) and data may be contained in any of them.
    Is it possible to use SAP XI Mailsender adapter to read such a file as an attachment? What kind of module development would we need for this? I am not much of a Java programmer so examples or links to other documentation would help.
    Thanks,
    Rudra

    Rudra,
    Use Java Mapping.  There is a free java api available called JExcelAPI to achieve this. 
    Shabarish's blog describes about this.  This might be helpful to you
    /people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives

  • Read date from an email using sender mail adapter.

    Hi All,
    I am working on a scenario, which reads emails from mail box using POP3 protocol and Mail adapter. How to get the mail attributes like received date? I have to take some decisions based on that field.
    Also can we tell to move that mail to different folder in that mail box after successfully read? it is like archiving folder in that mail box.
    Regards,
    Hari

    Hi Hari,
    You use IMAP4 (Internet Message Access Protocol) to retrieve e-mails from a folder of an e-mail server.
    You use POP3 (Post Office Protocol Version 3) to retrieve e-mails from an e-mail server.
    AFAIK,  you have to use IMAP4 protocol for moving email to another folder are reading email successfully. And i don't think POP3 will allow this functionality.
    Regarding email date , If you maintain Message protocol as XIPAYLOAD you will receive all header details(Subject , TO ,FROM ,CC,DATE ,etc ) in your payload.
    Thanks
    Hari.

  • Rx Mail Adapter configuration for Attachment sending and dynamic From/ To

    Hi
    I have a senario in which i have to send a file content as an attachment and then take the values of the from / to /CC from the xml dynamically and post.
    I am able to do it without dynamic
    Do we need to add some modules to do the same.
    RGds
    Aditya

    Hi,
    Check this Weblogs
    Dynamic Mail Address
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Triggering Email from folder
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u
    Mail Adapter options
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    <b>Cheers,
    *RAJ*
    *Reward points if found usefull*</b>

  • Sending mail adapter from Exchange server

    Hi ,
       I need to configure sender mail adapter which needs to forward the mails comes to the Microsoft Exchange server to XI and then to other application..
    MAIL->XI->SAP System..
      We  are using Microsoft Exchange server to send/receive mails..But we need POP3 url to receive mails ..is it possible to receive mails from the Microsoft Exchange server..
        Can anybody help me to find out the solution..

    Anandan,
    Yes it possiable to send mails from MailServer.
    Configuring the Sender Mail Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/frameset.htm
    Mail Adapter scenarios – SAP Exchange Infrastructure
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    Mail Adapter (XI) - how to implement dynamic mail address
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Also refer these links:
    http://www.microsoft.com/exchange/evaluation/compare/ClientCompare.mspx
    http://www.microsoft.com/exchange/evaluation/whatis.mspx
    http://www.trincoll.edu/depts/cc/documentation/email/IMAP_vs_POP/default.htm
    http://www.imap.org/papers/imap.vs.pop.brief.html
    Also please go through 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
    Just an additional info "sender mail adapter is to convert e-mails to XI messages"
    Message was edited by:
            Sreeram Reddy

  • Mail Adapter - Dynamically maintaining To and From Parameters

    Hi all,
    I am using the mail adapter as receiver in my scenario where i need to set up the TO and FROM parameters dynamically in the adapter configuration. Can any body please suggest how to do that?
    Thanks
    -Kulwant

    Kulwant,
    Did you gone thru this link?
    http://help.sap.com/saphelp_nw70/helpdata/EN/6b/4493404f673028e10000000a1550b0/content.htm
    use the below code
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail","THeaderTO");
    String to_add = "[email protected]"
    conf.set(key, to_add);
    return ""; 
    raj.
    Edited by: Raj on Oct 29, 2008 3:55 PM

  • SEnde Mail adapter problem from txt to xml

    Hi All
    I have the following scenario - Mail->XI->RFC.
    My interface keep crashing because of mapping errors. The attachment I am receiving from 3rd party like follow:
    ENG_TYPE|INDUST_NO|COMPANY_NUMBER|SURNAME|INITIALS|NAMES|REGISTERED|MALE|EXPERIENCE|RACE|MARITAL_CODE
    V|A0359214|137871|MASSANGO|J|JOSE|2007/01/18|1|458|A|7|4|1953/01/06|SHANGAAN|STANDARD
    V|A0359214|137871|MASSANGO|J|JOSE|2007/01/18|1|458|A|7|4|1953/01/06|SHANGAAN|STANDARD
    V|A0359214|137871|MASSANGO|J|JOSE|2007/01/18|1|458|A|7|4|1953/01/06|SHANGAAN|STANDARD
    V|A0359214|137871|MASSANGO|J|JOSE|2007/01/18|1|458|A|7|4|1953/01/06|SHANGAAN|STANDARD
    This is also how the data come into XI, and then the mapping crashes, how do I change to XML for the mapping to no crash.
    I cannot seem to find anything on the module configuration to work for the Sender Mail adapter.
    Thanks
    Clinton

    Hi,
    1. You can use MessageTranformBean to convert the Text to XML.
    Please look into this article for a demo on this,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    it talks about JMS but the messagetransformbean can be used for Mail adapters as well.
    Regards
    Bhavesh

  • How to retrieve client certificate information from sender mail adapter

    Hi, expert:
    I have a requirement to verify the validation of coming email with digital certification. The mail is with digital certification. If the coming email is valid, I 'll get the attachemt of the mail for further processing. I have a sender mail adapter and receiver file adapter configued.
    I have already my own developed adapter module, which is configued in mail adapter. My question is how to retrieve the detailed certificate information in the adapter module developed by myself. Is it feasible?
    Thanks a lot.

    The WL-Client-Proxy cert should be the cert used on the proxy side if SSL is configured between Apache and WebLogic, so I believe that is the reason why that does not work. Basically, the problem here is that SSL is end-to-end, and the two ends of this transaction are the client and apache.
    That said, when you add the +ExportCertData option, this should record the client's SSL certificate in the vairable SSL_CLIENT_CERT.  So you should be able to use request.getAttribute("SSL_CLIENT_CERT").
    See:
    http://www.modssl.org/docs/2.8/ssl_reference.html
    If this doesn't work for you (which is possible if the WL_Proxy is doing something funny to the request), it is probably best just to dump out the entire contents of the session, and see what you have:
    for (Enumeration e = request.getAttributeNames() ; e.hasMoreElements() ; ) {
    String attr = (String)e.nextElement();
    System.out.println("ATTR = " + attr);
    System.out.println("VAL = " + request.getAttribute(attr));
    If you can't see any SSL certificate there, you will have to work out some way to pass this on manually.
    cheers,
    Trevor

  • Error while using mail adapter

    Dear All,
    We have recently transported a scenario from XI 3.0 to PI 7.1.
    In this scenario a BPM is configured which on getting any error triggers an alert mail (Mail adapter configured).
    Now while testing in PI 7.1, mail message is getting generated but mail are not received and following error is coming:
    "Delivering 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: java.lang.StringIndexOutOfBoundsException: String index out of range: 0"
    If anybody has faced this type of error kindly guide me in resolving this error.
    Regards,
    NJ
    Edited by: nishu jain on Jul 13, 2009 9:08 AM

    Failed to call the endpoint
    Check if you have given the correct details of the mail-server in your receiver mail CC.....also confirm that the mail server is up and running....
    Regards,
    Abhishek.

  • Receiver Mail Adapter Issue.

    Hi All,
    I am running an interface from proxy to email using the inbound mail adapter. The email adapter is resutling in the following exception:
    failed to send mail: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    Could any one please throw some light into this issue?
    Thanks a ton! in advance.
    Thanks,
    Manohar Dubbaka.

    Hi,
    Thanks for the quick response.
    I am trying to send an attachment using the email. I am using
    Transport Protocol as : SMTP
    Message Protocol as : XIPAYLOAD
    Adapter Engine as : Integration Sever
    URL as: smtp://10.1.1.11
    Configure User Authentication as : Check
    Content Encoding as: base64
    Keep Attachments as : Check
    And also using the Adapter Framework modules as:
    AFT_Modules/StrictXml2PlainBean                               Local Enterprise Bean       1
    AF_Modules/MessageTransformBean                           Local Enterprise Bean        3
    AF_Modules/PayloadSwapBean                                   Local Enterprise Bean        2
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean      Local Enterpriese Bean   mail
    I am converting the XML message into comma separated text file using the following transformation
    1              Record.beginSeparator         "
    1              Record.endSeparator           "\r\n
    1              Record.fieldSeparator          ","
    1              singleRecordType               Record
    3             Transform.ContentType        text/plain;name="MGFSPECS.TXT"
    2             swap.keyName                   content-type
    2             swap.keyValue                   text/plain
    This mail adapter was working fine, earlier. I am not sure, why this is resulting in issues ?
    Truly, appreciate any kind of help in gettint this resolved.
    Thanks
    Manohar Dubbaka

  • Filename in sender Mail Adapter

    Hi Experts,
    Brief about Scenario:
    Invoice generated with PDF format in R/3 system and send to  mail box.  XI  pick that file from mail box  and deposited in SFTP Server.   
    Landscape in XI end.
    Mailbox - - -  XI 7.0 - - - SFTP
    The file name generated with CompanyCode_InvoiceType_InvoiceNumber.PDF from R/3 system. So that Same file name should be deposited in SFTP Server  . Here CompanyCode and InvoiceType are static and invoiceNumber generated dynamically with PDF format.
    My question is How to get file name from mail box.
    Thanks in advance.

    Hups. I forgot what was your main problem
    To get attachment file name you can try to implement you own adapter module as described [here|http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Get%20Attachment%20Name?bc=true]:
    I found it in this [thread|Need to get the Mail attachment name as it is to the receiver file adapter;.
    Please check that thread. The question is "not answered" but the last post states it was solved that way.

  • Sender Mail Adapter

    Hi,
      I am working on Sender Mail Adapter. I have done the total configuration but unable to sucess the scenarios. In the CC monitoring, it is saying that "Not Intialised" Even though i send and receive the messages from My Lotus Notes Inbox. I activated all the objects.
    I have done the following examples:
    Transport Protocal: POP3
    Message Protocal: XIALL
    Given the URL and UserId and PWD also
    Poll Intevel: 1 (Mins)
    Adapter Status: Active
    Please help to me solve this problem. I already raised the one more thread today but didn't get solutions.
    <b>Note: Do i need to do any setting from the Lotus notes(Mail Server) to diver my messages.</b>
    Thanks in Advance,
    <b>I found the problem with SMTP Address. Can i use the SMTP Url for POP3 or IMP4 protocal. Is there any thing else because if i use the Same SMTP Address, it is giving exception</b>
    Best Regards,
    Vijay
    Message was edited by:
            Gangisetty Vijaya Bhaskarudu
    Message was edited by:
            Gangisetty Vijaya Bhaskarudu

    Hi Gangisetty,
        SMTP is the out going server(for sending mails out) while POP3 is the in coming(receiving mails) server. So for a sender channel, you need to use the POP server details not SMTP.
    cheers
    danus

Maybe you are looking for

  • My ipod no longer synchs with itunes

    My ipod no longer syncs with iTunes and my computer. It shows up under devices, but not in itunes.  I installed an update from Apple yesterday. Could this be causing the problem (their updates have caused issues before), or is there something I need

  • Illustrator CS3 crashes at launch (Mac OS 10.6.8)

    Hello everyone, Can somebody please help me out from this. I'm using Illustrator CS3 on Mac 10.6.8. As I remember, I had installed some new fonts which I doubt it may have caused the error. I tried removing the User>Library>Preferences>Illustrator Se

  • Connect tv remote to laptop

    I have model  G5N44UA#ABA and want to be able to use a remote control when watching tv via my computer

  • Forwarding to a specific action on a different pageflow (not nested)

    Hi Suppose I've got two pageflows, A.jpf and B.jpf at the same level (i.e they're not nested). If I wanted to forward to action b() of pageflow B.jpf, how do I do it? As of now, I forward to B.jpf and the begin() action is called, but I need to forwa

  • Mac laptop screen going to sleep and changing desktop background

    last weekend my daughter called to say that her Macbook was acting strange. On Friday night she saw the battery icon said 25%, so she shut the system down. The next morning she plugged it in and booted. It took a while and the desktop background had