function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RRESRRES 

Use of setContentType and setInline methods on EmailFileAttachment

Does anyone know how to use setContentType and setInline methods on EmailFileAttachment? There is no documentation on code usage in the Winter 10 Release notes.

 

I'm trying to send an iCal invite from Apex. I would think the MIME content type would be text/Calendar but I'm not sure how to set that.

 

Thanks,
Rich 

tolian02tolian02

Hi Rich,

 

I am having the same issue. I have tried the following without success.

 

 

setContentType('text/calendar');

setContentType('application/calendar'); 

setContentType('text/x-vCalendar'); 

setContentType('application/x-vCalendar');  

 

Additionally, I strongly believe, but am not certain that this method sets MIME type.

 

 

Have you found a solution yet?

RRESRRES
Nope. Nothing. I have no idea why these methods weren't documented in the release notes. I'll let you know if I find anything. 
JPClarkJPClark

Anything happening on this?

We haven't heard anything from Salesforce how they are able to perform this operation.