You need to sign in to do that
Don't have an account?
sheetal agrawal
attachment content type
Hi,
the code below gives attachment name as SoSME DQ Extract..... , ignoring the '/' bettween
"So SME". Can anyone help me getting the '/' in attachment name
Messaging.EmailFileAttachment attachment = new Messaging.EmailFileAttachment();
attachment.setFileName('So/SME DQ Extract'+System.now()+'.csv');
attachment.setBody(b);
attachment.setContentType('text/csv');
the code below gives attachment name as SoSME DQ Extract..... , ignoring the '/' bettween
"So SME". Can anyone help me getting the '/' in attachment name
Messaging.EmailFileAttachment attachment = new Messaging.EmailFileAttachment();
attachment.setFileName('So/SME DQ Extract'+System.now()+'.csv');
attachment.setBody(b);
attachment.setContentType('text/csv');
Special characters are omitted in EmailFileAttachments. If these are not omitted then there will be a problem while downloading and viewing those attachments. So you can't put forward slash in the email file attachment name. It will be omitted before getting attached.
If this answer solves your problem then mark it as the solution to help others. Thanks.
Is tehre anyway to get the special characters? can i use Cutom lables and call in EmailFileAttachments.?