PDF's base64 is missing when using MailKit Message.rawData

Hello,

I'm trying to build a MailKit extension that parses PDFs.

My extension initially gets the call for decide action, I request invokeAgain.

  func decideAction(for message: MEMessage, completionHandler: @escaping (MEMessageActionDecision?) -> Void) {
        guard let data = message.rawData else {
            completionHandler(MEMessageActionDecision.invokeAgainWithBody)
            return
        }

       let content = String(data: data, encoding: .utf8)
       print(content)

When I try to reconstruct the PDF attached: I find the headers, and the text content, but I don't see the base64 content of the PDF file.

Is there something I'm missing here?

Thanks in advance

PDF's base64 is missing when using MailKit Message.rawData
 
 
Q