webMethods

webMethods

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.

 View Only
  • 1.  How to send email

    Posted Wed March 27, 2013 01:00 PM

    I’m trying to send an email with a html body but everytime that i set the contenttype of the boty to text/html the email came empty, what it could be?.
    The services that i used are, createMimeData → addMimeHeader → stringToStream (with the html) → addBoydPart (with the contenttype set to text/html and encondig set to quoted-printable) → getEnvelopedStream → Stmp.

    I attached and image. Thank you.


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: How to send email

    Posted Wed March 27, 2013 01:48 PM

    I have another way of doing with smtp service for handling as HTML body.

    Use the service
    pub.report:runStringTemplate (set $template) with similar code as below

    Status Report

    Total Errors Count: %value totalErrorDocCount%
    %loop report_results% %endloop%
    webMethodsDocumentID
    %value DocID%

    And convert the output $txt string to bytes and in the smtp service map the bytes to

    attachments[0]/content and
    attachments[0]/contenttype (text/html)

    This setup should get the HTML body in the email…please test it in DEV.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How to send email

    Posted Wed March 27, 2013 02:29 PM

    I have test it, but it still having the email body empty, i think that gmail does’t support mime attachment or cid image in html. Have you ever try this?. Thank you.


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: How to send email

    Posted Wed March 27, 2013 03:00 PM

    Did you try with above mentioned steps with out MIME steps?..My solution is with out having MIME streams etc…so create a brand new test flow and test it.

    Can you try email to outlook id and see how it works?

    Either way my provided solution should work for any email servers.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: How to send email

    Posted Wed March 27, 2013 04:31 PM

    Ok, i will try in outlook, in gmail does’t work, but if i change text/html by text/plain the email body appear the html code perfectly, its very strange. i think it’s the gmail security rules. Thanks you.


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: How to send email

    Posted Wed March 27, 2013 05:01 PM

    May be…as long it works for you!


    #webMethods
    #Integration-Server-and-ESB