Change file name for attachment to an email

Hi,

I am sending a file as an attachment using the smtp service. Everything is working fine except that the filename of the attachment is the same as the full file path of the local file. Is it possible to change the filename? I tried passing the content to the smtp service but keeps getting a ClassCast Exception.

Thanks

Rudi,
Use the field “attachment->filename” in the pub.client:smtp service and fill in a name of your desire.

Hope it helps.

I guess you are invoking pub.client:smtp and passing the contents for the attachment.

HTH

Thanks Bhavani,

I am actually passing the local filename to the filename field, the file then are attached fine but with the full local file path as the file name, for some reason it does not allow me to pass the content to the smtp service, as soon as I use the getfile service before passing the bytes into the smtp service I get the classCast exception?!

Cheers