I’m trying to upload a url which points to a PDF document and then email that document as an attachment. I’m using LoadDocument to upload it and it seems to work (no errors) but when I attach it to an email, send it using smtp and try to open the attachment it says ‘could not open because it is either not a supported file type or because the file has been damaged’.
I use the same smtp service to attach pdf documents which have been uploaded using getFile but that’s when I have a file path and not a url and it works fine.
I am using the following settings in LoadDocument:
method = get
loadAs = bytes
I am using the following settings in smtp:
charset = ISO-8859-1
attachments.contenttype = application/pdf
attachments.encoding = base64
Any suggestions welcome.