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?
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)
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
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!
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 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…
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.
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
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
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.