Skip to Content
0
Mar 19, 2007 at 10:59 AM

File type problem with email attachments

22 Views

Hi,

I'm using SO_DOCUMENT_SEND_API1 to send email with an attachment. This attachment is a random file uploaded by the user on an ITS web site and sent to my FM.

It is all working fine as long as I tell SO_DOCUMENT_SEND_API1 that the doc_type is 'PDF'. When I say it's 'JPG' I get an error "Message cannot be processed as it cannot be converted".

It's not the actual file that is the problem, I can send jpg-images or any other file as long as I say t_packing_list-doc_type = 'PDF'. However this leads to the attached file being called *.PDF instead of *.JPG, and the receiver has to rename it.

The relevant code is

t_packing_list-doc_type = ld_format.

t_packing_list-obj_descr = ld_attdescription.

t_packing_list-obj_name = ld_attfilename.

where

- ld_format is the file extension (e.g. 'jpg', 'pdf', ...)

- ld_attdescription = ' ' (1 space)

- ld_attfilename is the file name without extension (e.g. 'image001')

My FM has to work with any file extension. It receives the file name and the file extension (jpg, pdf, doc, whatever) as an input parameter along with the file, and I just need to be able to email this file with the originale file name and extension no matter what that extension is. Any suggestions? Tia.