Problems with the PDF attachement.

Hi All,
I am trying to send an email through pub.client.SMTP
I have framed the content as MIME using the MIME inbuilt services.

My mime content is a multipart message.
The mail contains a message body (text) along with the PDF attachement.

The PDF attachment is coming in the mail that is generated.
But by default the attachment name is coming as encode.buf

I gave the attachment name in the MIME inbuilt service while framing the PDF content as MIME. (Eg: TESTFILE.PDF)

But even then it is coming as TESTFILE.PDF.buf in the attachment.

Does somebody have any clues?

Reg,
wmuser

Hello,
The message you are trying to send is simple. You can use the pub.client:smtp service directly to construct a multi-part messasge. Use whatever services you need to get the content as a stream (pub.file:getFile if it is on the local server). Construct a single Document structure with matching fields as is used on the smtp service (contenttype, filename, encoding, charset, content) and map them to your values. For the contenttype, you can specify “application/pdf”. For the filename it is your choice. For the encoding, specify “base64”. You can leave the charset empty. Now construct an array Document with the exact fields as the smtp service is expecting. Append your single document to the array document and set that as the input on “attachment” field of the smtp service. Use the body field for your text message portion. I manually ran this test myself with success. Thank you. Good day.

Yemi Bedu