KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Sending PDF using SMTP_Attachment
PRODUCT: 4D | VERSION: 13.2 | PLATFORM: Mac & Win
Published On: May 30, 2013

When sending a PDF attachment to different mail servers (e.g Gmail, Exchange), the encodeType used for the MIME can affect if the recipient is able to open the PDF. Not every mail server is able to decode all encodeTypes, making the recipient believe the file is corrupted. To ensure compatibly with the mail server, it is recommended to encode the PDF using Base64.

The command SMTP_Attachment uses a third parameter encodeType. The recommended encodeType found compatible with multiple mail servers are:

±2 = Base64; ±5 = AppleSingle AND Base64; ±6 = AppleDouble AND Base64; ±7 = UUEncode

More information regarding SMTP_Attachment, please visit the documentation:
https://doc.4d.com/4Dv13.2/help/Command/en/page88972.html