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

From the API, I'd like to sendEmail() with an attachment. How? Workaround?

From an S-control I'd like to build up and e-mail message and send it to someone along with one or more attachments. 

These attachments could be attached to an object or a document. As near as I can see, this can't be done with the current API call.   (IdeaExchange request is HERE )

Does anybody have any suggestions as to how to workaround this?

I suppose I could create a contact with the e-mail address (it's always going to be the same one in this usage), and a template with a blank text and blank Brand Template.

Then in my dynamic code, I could add the Body, add attachments to the template, send a Mass e-mail to that one recipient using the template and then clear out the body and delete the attachments for the next usage.

But, the messages I send this way will have the attachments as HTML links instead of true attachments.

And, it's a pain in the butt.

Any other thoughts anybody?   Thanks, Steve.

P.S. Does emailAuthor.jsp suffer from the same limitations?  I can't find documentation on that so I presume it's unsupported?