

In a single instance of mime data you can attach multiple files as well as mail body. You will get an email with attached PDF and text. Pub.mime:getEnvelopeStream(form mime stream) Pub.mime:addBodyPart(pass stream of email body,Content-type: text/plain charset=UTF8, encoding: quoted-printable ) Pub.mime:addBodyPart(pass the pdf stream generated in 2nd step, for pdf mention ContentType: application/pdf name=“Test.pdf”, encoding base64) Pub.mime:createMimeData(it will create a mime data, you can add attachment and email body to it) Pub.io:bytesToStream(convert bytes to stream) One more option is to make use of pub.mime.* services to transform PDF to mime stream and then send it via smtp. I get a mail with a funny pdf that is unreadable. Then pass this bytes to ntent of the smtp serviceīut when we open the attachment in the mail, we get the error saying file is not decoded properly. Set the ntenttype=application/x-pdfīut when we open the attachment in the mail, we get the error saying cannot read the file as file is damagedĮncode the pdf.content in bytes using the pub.string:base64Encode Then pass the PDF-content in bytes to ntent of the smtp service Delete the PDF file from the file system after it has been made available to application user.Use the FO file to generate the PDF using the pdf:xsltopdf.(custome java service).Pass IS document data in XML format to XSLT to convert to FO format.Prepare XSLT based on the PDF Report layout.First generate a PDF by thr following stepsĪnd we were suppose to generate the PDF report
