IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  Generating a .msg file

    Posted Wed August 23, 2017 11:56 AM

    Hello guys,

    I would like to ask you, if there is any way to create/generate a .MSG file (used for Outlook e-mails) using webMethods. I have seen just ways to create .CSV files, but this is a specific case.

    Thanks in advance.


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Generating a .msg file

    Posted Wed August 23, 2017 01:15 PM

    Hi Igor,

    can you please explain your use case in detail please?
    What will happen with this .msg file after it has been created?

    Provide your webMethods version please.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Generating a .msg file

    Posted Thu August 24, 2017 05:05 AM

    Hi Holger,

    we are using WM 9.12 and the use case is that we want to save the e-mail content to a file (for example you receive an order via e-mail and you want to store it somewhere on disk). The e-mail is picked by a polling notification and then processed in pub.flow:getTransportInfo, which gives a sensible e-mail structure. But I am not sure about the next step(s).

    Regards,

    Igor


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Generating a .msg file

    Posted Thu August 24, 2017 11:30 AM

    Hi Igor,

    you can use pub.file:writeFile to write to a file by passing the email node as input data and just give filename.msg as the filename.

    Remember to adjust WmPublic/config/fileAccessControl.cnf and reload WmPublic package.

    Or you can try to convert the email into a XML structure and write this structure to disk.
    pub.xml: documentToXMLString will be helping here.

    Sample for a possible XML structure:

    
    <?xml version="1.0"?>
    <Mail>
    <to>xxxx</to>
    <subject>xxx</subject>
    <from>xxx</from>
    <mailhost>xxxx</mailhost>
    <body>xxxx</body>
    <status>xxx</status>
    </Mail>

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB