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.

 View Only
Expand all | Collapse all

Formatting mails

  • 1.  Formatting mails

    Posted Fri July 11, 2003 08:33 AM

    I need to mail some results which are in tabular format.Is there any possibility of HTML formatting available for smtp service…?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Formatting mails

    Posted Fri July 11, 2003 04:43 PM

    Not for the SMTP service itself, but if you use a template to format your data then call the SMTP service you will achieve the results you are looking for. Basically you need to format your email body before calling the SMTP service.

    Take a look at the pub.report services


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 3.  RE: Formatting mails

    Posted Fri July 11, 2003 05:18 PM

    Arun,

    Use this built-in service pub.report:runTemplateOnPipe which takes template as input param (design html page with wm output template functionality) and put this designed html template file in ISserver/packages/pub/templates file folder and after running this service gives you $txt output and next step will be the mapping of $txt to SMTP (body param)which accomplishes your task by formatting the body of email .

    HTH.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Formatting mails

    Posted Fri July 11, 2003 05:21 PM

    sorry,html designed template file should be placed in the following destination:

    ISServer/Packages/yourPackage/templates folder…


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: Formatting mails

    Posted Tue July 15, 2003 08:36 AM


  • 6.  RE: Formatting mails

    Posted Tue July 15, 2003 01:04 PM

    I’m able to format mails…But if i send that formatted message i’m getting message with HTML tags…For this settings to be done in the Mail Client side or in the WM side…? Bcas in the case of ASP or JSP we’ll be setting this in the serverside components…


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 7.  RE: Formatting mails

    Posted Tue July 15, 2003 03:26 PM

    Arun,

    take a look at:

    [url=“wmusers.com”]wmusers.com

    I did a search for “HTML EMAIL”

    -Thomas


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 8.  RE: Formatting mails

    Posted Tue July 15, 2003 03:49 PM

    You can use these steps to make the pub.client:smtp service send HTML messages. First, in your service, create a body variable, and set it to contain the HTML that you want to be sent, concat’ing and looping as needed to append table rows and such. Second, build a smtp wrapper service called sendHTML that has to, from, [cc,] subject, & body inputs. The first line of this new two-line service will be a stringToBytes call. Map this service’s in param, body (it will ultimately be your HTML), to the stringToBytes’ string service-in param, and drop body. Third, map the stringToBytes’ byte output param to the smtp service’s attachments/content service-in param, while setting attachments/contenttype to “text/html”.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Formatting mails

    Posted Thu April 13, 2006 10:03 PM

    Hi Arun,
    This is Venkat new to webMethods. I think you might have got a way for problem. Well I am at the same page where you were. I can use a template but the final email body is showing with html tags which is supposed to be formatted. So could you please walkthrough me further?

    Thanks!
    Venkat


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 10.  RE: Formatting mails

    Posted Thu April 13, 2006 10:18 PM

    Venkat,

    What type of formatting are you looking for?
    you can set content-type=text/plain for non html format.

    HTH,
    RMG


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 11.  RE: Formatting mails

    Posted Thu April 13, 2006 10:31 PM

    Hi there!
    thanks for your quick response.

    in fact I am trying to use email service to send emails which is supposed to give an output in HTML format so that I can format the email text as per the requirement.

    And I am using the components like:

    • template as input.
    • runTemplateOnPipe
    • sendEmail service

    Appreciate your help

    thanks!
    Venkat


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 12.  RE: Formatting mails

    Posted Thu April 13, 2006 10:33 PM

    Your steps looks good.What is the actual problem you running into?
    If html then did you set content-type=text/html in smtp service?

    HTH,
    RMG


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 13.  RE: Formatting mails

    Posted Thu April 13, 2006 11:07 PM

    hi,
    By the way I am new to this, so could plz tell me where exactly can I set this property? To my knowledge do I need to change the charset property of the smtp service or any where else?

    Thanks!
    venkat


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 14.  RE: Formatting mails

    Posted Thu April 13, 2006 11:52 PM

    Venkat,

    If you have successfully obtained a $txt output by following what RMG suggested (ie your $txt contains the html that you want to send as email), map this $txt to the attachments/content and then set the attachments/contenttype=text/html. Set rest of the parameters (to, cc, subject, mailhost, mailhostport), except for body and execute your service. You should shortly see an html email :slight_smile:

    HTH, Rohit


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 15.  RE: Formatting mails

    Posted Mon April 17, 2006 10:29 PM

    Hi,
    Finally I could able to format the email as an html output. All I did was use the attachment attribute of the email service and set it’s content type to text/html.

    Thanks guys!
    Venkat


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 16.  RE: Formatting mails

    Posted Tue April 18, 2006 05:23 AM

    Absolutely… that’s the part you were missing. You don’t have to set the ‘body’ of the smtp service, instead you set the ‘content’ with the HTML string and set the contenttype to text/html.

    Glad you got it working :slight_smile:


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB