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
Expand all | Collapse all

Sending HTML email via SMTP with attachment

  • 1.  Sending HTML email via SMTP with attachment

    Posted Wed March 23, 2005 10:05 AM

    Hi,

    Hope someone can help.

    I’m trying to send an email with html body text, usually I would pass the html text to the attachments bit in smtp and it would ‘appear’ in the body of the email. However, I’m also attaching a PDF file to this email. If I pass the html code and the filename for the PDF document, I end up with an email with two attachments and no body text.

    Is there another way of getting the body text of an email to be nicely laid out like html code?

    Thanks,

    Gill


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 2.  RE: Sending HTML email via SMTP with attachment

    Posted Wed March 23, 2005 12:03 PM

    Hi Gill,

    I created a test package with a service that successfully sends out an email with the body text in html format and contains an XML attachment.

    The solution I used is based on the MIME APIs (not sure whether there is any other way to do that).

    Note that the first body part added to the MIME object corresponds to the email body text, all following parts will be added to the email as an attachment. At least that’s the behaviour I derived from the tests I ran.

    Please read through the “MIME-S MIME Developers Guide.pdf” webMethods documentation guide for more detailed information.

    I hope this answers your question

    Philippe

    Sending out HTML email with attachment
    TestPackage.zip (5.9 k)


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Sending HTML email via SMTP with attachment

    Posted Wed March 23, 2005 12:06 PM

    Oups, I noticed that I forgot to change the destination email address (that’s mine). Those who download this test package, please do not forget to change that.
    Thanks
    Philippe


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Sending HTML email via SMTP with attachment

    Posted Wed February 22, 2006 08:07 PM

    Thanks! I started playing with the MIME stuff and was getting frustrated so I came here looking for a pre-built set of the MIME functions that would do it. Very useful!


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Sending HTML email via SMTP with attachment

    Posted Tue June 27, 2006 02:01 PM

    Hi,
    I am attaching PDF file with HTML email using SMTP service. But when I open the attachment in email client there are no pages. Setting used is follows.
    addBodyPart
    contenttype=application/pdf;name=“TnC.pdf”
    isEnvStream=no
    encoding=binary

    I am using Developer ver6.0.1.

    Any help please!


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 6.  RE: Sending HTML email via SMTP with attachment

    Posted Wed June 28, 2006 04:46 AM

    Hi,
    I solved the problem by changing the parameters as below.

    contenttype=application/PDF;charset=ISO-8859-1;name=“TnC.pdf”
    isEnvStream=no
    encoding=base64


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Sending HTML email via SMTP with attachment

    Posted Fri April 18, 2008 09:00 AM

    i have a problem can any body pls help me out

    i have two servers,1st in USA and 2nd is in India.In USA server there is a submit form where our client send thier problems/issues/bugs and this information is get stored into a data base at the backend.and after that we manually enter all this infor mation into India server.

    but i want to do this manual work automatically by using XML.

    I want that as soon as the cliet submit thier problem in USA server through XML a E-mail is send to the India server and the respected owners of that problem
    can any one tell me the hole procedure to this task plsssssss…


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 8.  RE: Sending HTML email via SMTP with attachment

    Posted Fri April 18, 2008 03:13 PM

    Try using polling notification on the table where data from USA server gets inserted, the service which gets called by that polling notification process can have the SMTP service to send email or rather have the complete logic to enter that data to India server automatically.

    Note: It would be beneficial for everyone if you create a seperate post since your issue doesn’t match up with the current post.


    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: Sending HTML email via SMTP with attachment

    Posted Mon April 21, 2008 06:11 AM

    hi Talha
    thanksss… for replying actually i am new to this line thats why i dont know what is polling notification.can you please tell me this and rest of the things in a bit detail.
    plsss :slight_smile:


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: Sending HTML email via SMTP with attachment

    Posted Mon April 21, 2008 08:59 AM

    hi all
    my privious thread was a bit wrong my actuall problem is:>

    USA server name --server1

    India server name in which automatic mail is transfered–server1

    another server in India name – server3

    whenever any client submit thier problem in server1 an automatic mail is forwarded to our server(server2) then that information is manually updated into the another server whose location is also India and whose name is server3. but instead of manually entering these information i want that an automatic e-mail is send to server3 and the respected owners of that problem, that client have submit this or that problem in server1 solve thier problem.

    can any body tell me how can i send mails automatically from server2 to server 3 by using XML or MAPI or by using any thing else

    plssssssss help me out
    i reallyyy need help
    :confused:


    #Integration-Server-and-ESB
    #webMethods
    #webmethods-Protocol-and-Transport


  • 11.  RE: Sending HTML email via SMTP with attachment

    Posted Mon April 21, 2008 03:43 PM

    Well in that case I would say that create a Email port on server 2 so whenever an emails comes you can put the logic in your service, invoke by email port, to send another email to respected owner or whoever you want to.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB