I need to send PDF file as attachment through email. I am able to send it using pub.cleant:SMTP service. However when I try to open that PDF file it gives error file is not decoded properly. I am passing htmlmailStream as input to the pub.cleant:SMTP. htmlmailStream is obtained from the output of pub.mime:getEnvelopeStream.
Can you please suggest hot to resolve it.