Design: Downloading attachement using Mail adapter

Hi Experts
I am currently building an interface which requires attachment to be downloaded in XI box. Is this possible using sender mail adapter. Could someone validate the feasibility of the design.
Requirement in Brief
A bank is sending a file through e-mail as an attachment to a file system and XI has to move the file to target system using FTP adapter. Now we want automation on source end. Instead of manually downloading the file to file system we want file to be direcly posted to target system.
So few questions with regard to requirement:
1) Can I download the file from mail in XI and then post the downloded attachement to Target system.
Could someone please provide me with the steps for downloading the file to XI??
Regards
Abhishek Mahajan

Hey
Please have a look at the following blog
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Thanx
Aamir

Similar Messages

  • Sending File as attachment using Mail adapter with naming convention

    Dear All,
    I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name  to one of the folders at FTP and also to my customer at his email id.
    I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
    Regards,
    NJ

    what you need to do:
    1) Select ASMA in Sender and receiver File CC...already done
    2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
    3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
    so your entire Content-Type node will have something like text/plain; name="abc.ok"
    SAP Note has reference on how to do this:
    https://service.sap.com/sap/support/notes/856599
    From the note:
    Q: How can I set the file name of a mail attachment?
    Regards,
    Abhishek.

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • How To Send A Text Attachment Through MAIL Adapter

    Hi Experts,
       I Did A Scenario that is  By using file adapter at the sender side and PI as a middle ware i have sent one text file to database
    Now here my question is
    I have to send the same text file which i have sent database... my using Mail Adapter
    Simply  File to Mail Scenario
    FILE         PI                MAIL
    But I have to send the same text file which i sent to database... by using mail adapter... Here all the configuration are done ... And the channels are working properly... only thing  here is..to send same text file using mail adapter..
    It will be good if  any one can explain step by step..
    Regards
    aravindh

    Hi Rajendra,
       Tanq for connecting me ... This  Blog helped me a lot ....And it is a useful answer to me..
    For this file to mail scenario we have got .txt as an attachment ... Its fine ... But her my Client is asking me to add CONTENT in the mail... Content in the sense..
    Example of content...
    Hi,
    Please find the attachment
    Regards,
    sap pi,
    They need in the form of like this...  To add content in the mail  What i have to do...DO i need to add more configurations if it is what are they...
    Please solve the issue.. It is appreciated  some one can explain me step by step or .. By sending me screen charts..
    Thanks in  advance....
    Regards
    vinay

  • PDF attachment in mail adapter

    Hi
    I am reading mailbox using mail adapter. But i cannot read the PDF attachment in that mail. I use "PayloadSwapBean" in the module, but it is packing the mailbody to the text file, but they is no sign of PDF attachment. How to read the attachment.
    Regards
    Andy

    Hi Anandan,
    You can use Java/ABAP proxies to do this job for you..
    Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
    Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
    If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher

  • File attachement in mail adapter

    Hi ,
    I need to send users an error report which I have captured in the form of a file. Is it possible to attach this file as an attachement via mail adapter. I have been reading that the payload can be sent as attachment by specifying the interface namespace and interface name. But my requirement is to trigger the mail once the file has been completely written and not for every message. The reason being I could have 3000 records in the file and I dont want to send 3000 MAILS out but just 1 mail for the entire 3000 records...
    Thanks,
    Teresa

    Hi Teresa,
    I hope, I understand you right.
    When you use the file-adapter for sending the file, you can without mapping send this file out to a mail receiver as attachment, there is nothing special to do.
    Regards
    Stefan

  • Sending a File (XML or TXT) as attachment to Mail Adapter

    Dear all,
    In a scenario I'd like to pull a file by using  'File Adapter' and send it (without content change) as attachment to an Email recipient.
    Is their any possibility to send a file by using Mail Adapter?
    Do you have any similar solution in place, if so could you please share your experiences with me?
    FYI, we are using XI 3.0, SP14.
    I'll appreciate your time.
    Regards,
    K. Afsali

    Hi Afsali,
    //Is their any possibility to send a file by using Mail Adapter
    it is possible.
    There are a few steps to it though. You will have to convert the file you pick up into an XML file as XI can process only XML data.
    After you are done with it, you will have to import a WSDL for sending mails. this WSDL is available on SAP Marketplace and it will have all details like from, to subject,and content. To get this WSDL just check this link,
    https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
    Just do the mapping of the respective fields and the information mapped to the content field will be passed as the content of the mail.
    Just check thise links out,it will surely help you
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Regards,
    Bhavesh
    Message was edited by: Bhavesh Kantilal

  • Sending Formated email content using Mail Adapter !

    Hi,
    I would like to send email notification to customer using mail adapter, could you please to advise how to prepared the content of the email with little bit formated like sample below :
    Dear Madam / Sir
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxx :
    yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
    Best Regards,
    Since the constant function only can accept single line, how i can add change line.
    thank you and Best Regards
    Fernand

    Hi Fernand,
    There are a couple of blogs in SDN regarding sending formatted mail using Mail adapter. I guess there is one written by Prakash Arunachalam. Just do a search and it will give you some idea on using XSLT to achieve the result.
    If all you need is multi line in the content, use a UDF and use \n when ever you need a new line and \t for tab space.
    Regards,
    Jaishankar

  • Prerequisites To Use Mail adapter

    hi All,
    Are there any prerequisites to use Mail adapter in PI (like anydrivers etc ),pls guide me on this.

    Hi Sagar
    AFAIK there is no additonal drivers or specific installation for using mail adapter .
    Please follow below links to setup a channel and test it out.
    https://help.sap.com/saphelp_nw73ehp1/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm
    856599 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 Mail Adapter
    Best Regards
    Srinivas

  • I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    I tried to send too large an attachment using mail,and now mail is hung up trying to send any message.  How do I reset mail?

    It will time out, if it hasn't already. Delete the message from the Outbox.

  • Change attachment name using mail adapter

    Hi All,
    I have a problem changing the attachment name in my scenario. I use Mail scenario to send a pdf Attachment from R/3 to email address. Everything working fine except the attachment name that becoming untitled.pdf and untitled.txt.
    Communication Channel setting :
    message protocol : xipayload
    transport protocol : smtp
    checked use mail package
    checked keep attachment
    I have use MessageTransformBean in my receiver adapter, but no luck. It was produce an error.
    anyone have an idea to solve my problem?
    thx,
    Robby

    Hi,
    You need to go to the Module tab of the Mail adapter receiver communcation channel and give the parameter as Transform.contentDisposition and its value as attachment ( since you needed the output to be sent as an attachment) and give the name of the attachment as you required.
    Please see the help page : [http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm] for more details and more options of the parameters.
    Regards,
    Kalpana.

  • How to access MS Exchange Server Mail and download attachment using Java ??

    Hi guys,
    I need to develop a program to access my inbox from MS Exchange Server and also download the attachment using Java language !! Any example code or any site which got tutorial on this ? Thanks !!

    Here is a java file that connects to a users exchange account, reads all messages, and writes the attachment to the file system.
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class TestNew {
    public static void main (String args[]) throws Exception {
    // Create empty properties
    Properties props = new Properties();
    // Get session
    Session session = Session.getInstance(props, null);
    // Get the store
    Store store = session.getStore("imap");
    // Connect to store
    store.connect(host, username, password);
    // Get folder
    Folder topFolder = store.getDefaultFolder();
    Folder folder = literature.getFolder("newFolder");
    folder.open(Folder.READ_WRITE);
    Message[] msg = folder.getMessages();
    for(int i = 0; i < msg.length; i++){
    Address[] from = msg.getFrom();
    String subject = msg[i].getSubject();
    Object o = msg[i].getContent();
    if (o instanceof MimeMultipart) { //attachements available?
    MimeMultipart mm = (MimeMultipart) o;
    int mmCount = mm.getCount();
    for (int m = 0; m < mmCount; m++) { // for each part
    Part part = mm.getBodyPart(m);
    String disposition = part.getDisposition();
    if ((disposition != null) && ((disposition.equals(Part.ATTACHMENT) || disposition.equals(Part.INLINE)))) {
    InputStream is = null;
    File tempFile = new File("D:\\TEMP\\mailtest\\" + part.getFileName());
    FileOutputStream fos = null;
    try {
    fos = new FileOutputStream(tempFile);
    is = part.getInputStream();
    int byteCount = 0;
    byte[] bytes = new byte[128];
    while ( (byteCount = is.read(bytes, 0, bytes.length)) > -1) { //use full read() method for GZIPInputStream to be treated correctly
    fos.write(bytes, 0, byteCount);
    finally {
    try {
    if (fos != null)
    fos.close();
    catch (IOException ioe) {}
    try {
    if (is != null)
    is.close();
    catch (IOException ioe) {}
    System.out.println("Content: " + o);
    System.out.println(from[0].toString());
    System.out.println(subject);

  • Can XI Message be mapped to a flat file attachment in Mail adapter

    Hi guys,
    I have a requirement, where I have ECC system seding a XI message to XI.
    Now XI has to convert this to a flat file may be tab delimited and send this as an attachment in email using receiver mail adapter.
    I want to avoid BPM and make it simple.
    Appreciate any help on this topic.
    Regards
    Sujan

    Hi,
    Here are some mapping examples.
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    /people/venkataramanan.parameswaran/blog/2006/12/12/java-mapping-to-handle-flat-files-in-sap-xi
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi
    Vishal

  • Plain text and attachment in Mail Adapter (Receiver)

    Hello,
    we have to generate a mail in the mail-adapter with a specific text and an attachment.
    The attachment is a document in pdf-format, that is generated inside an adapter-module out of the payload-document.
    An additional text has to be added to the mail for the receiver in plain-text-format, like "Dear customer ... enclosed you will find ...".
    Is it possible to mix plain-text and attachments in the mail adapter? Does anybody know how we can do that?
    Regards,
    Thorsten

    Hi,
    yes you can do it very easily inside the adapter module
    if you're already using the adapter module then
    you can just enhance it a little bit
    you can add the pdf to the attachment section and
    leave dear customer in the standard payload
    you can even make it a little bit more dynamic
    and create a module that will take the input from
    the communication channel config (modules tab) - for example xml tag name in which you will specify
    the dear customer (or any other text) and after this
    the pdf creating can use the xml without this tag...
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Remove Attachment in Mail Adapter Module

    Hi!
    My problem: I get an email with an attachment which I process in an adapter module for the mail adapter. With the resulting XML I set a new payload, but the old attachment still exists.
    This gets to a problem when I route the message back to the mail adapter, he adds the old attachment to the generated email. Therefore the new email has two attachments: the old one and the new one, which should only be one attachment: only the new one.
    How can I remove the old attachment? I found no function which solves this problem.
    Best regards,
    Daniel

    Hi Michal,
    thanks for the link.
    When I import aii_proxy_xirt.jar in my NWDS, I can import the MessageSpecifier class. But I can't get an instance of it from the classes which I can access.
    The only 'documented' usages of this class I found were codings for java proxies, so I'm not sure we can use this class in an adapter module.
    In this cases they get the MessageSpecifier instance from the proxy bean, so maybe we can get it from the EJB, but this doesn't work with an adapter module (or I haven't found out how )
    Hmm. It is a simple problem, but it seems difficult to solve
    Best regards,
    Daniel
    Message was edited by: Daniel Himmel

Maybe you are looking for

  • How can I get a Mac number without a working phone

    Our Home-Hub dosn't work & BT have cancelled our order for new phone & upgraded Home-Hub. Despite attempts to resolve the matter BT will not reply by email but instead keep phoning even though they know our phone isn't working. Seems our only recours

  • SWIFT code change

    Dear, one of our banks changed the SWIFT code, we need to update it in Bank Master, do we need to update bank data on each vendor were we have this SWIFT or it will be updateted automatically after the change in BANK Master? Thank you for help

  • Error: 'The File exists 0x80070050' when updating a MVC5 app to Microsoft Azure Tools 2.5

    I've a MVC5 app that uses Microsoft Azure Tools v2.4. I want to update the Azure Tools to 2.5. I'm using Visual Studio Community 2013. When I go to the properties of the Azure project, select the Application tab and then click upgrade I get the error

  • [Solved] USB mics don't work

    I've problems with the mic from a webcam and Zoom H2 as an usb mic - neither will be recognized. It used to work some month ago... Webcam messages [24389.259085] input: UVC Camera (046d:0802) as /devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0/input

  • Scanner delimiter problems...

    hey everyone, I am attempting to read from a file using Scanner and wanted to change the delimiter so that it would read through the file and pick out the info I need. However when i try Scanner inputStream = new Scanner(new FileReader(file));