Hi (DeskTop on Windows App)
This is my code but i can no open pdf files on my iphone
if mAttachFile <> “” then
file = new emailAttachment
file.ContentEncoding=“UTF8”
file.MIMEType = “application/pdf”
file.ContentEncoding = “Base64”
file.Data = EncodeBase64(“PDF”)
file.loadFromFile getFolderItem(mAttachFile)
mail.attachments.append file
end if
What happens? What is the result? A bit more detail would be welcome.
Your code is rather strange. There are 2 lines for setting the ContentEncoding. Which aren’t needed. The same goes for the data of the file. You first encode and load the string “pdf” and then you load from a file. IS the file a pdf?
Here is my code for doing gzip files:
dim theAttachment as new EmailAttachment
theAttachment.LoadFromFile(tempFile)
theAttachment.Name = "CrashLogs.gz"
theAttachment.MIMEType = "application/gzip"
I do seem to remember that the order of the code is important. Oh, and the attachments still show up with duplicate names even in 2016r1.
works but the file name i get on iphone email is mime-attachmant.pdf and i set the name to Alex.pdf
if mAttachFile <> "" then
file = new emailAttachment
file.loadFromFile getFolderItem(mAttachFile)
file.Name="Alex.pdf"
file.MIMEType = "application/pdf"
mail.attachments.append file
end if