I suspect the answer here is "No", but I thought I'd ask anyway. Can I send an email, using a VFTemplate, to an arbitrary email address, as opposed to a Contact, User, or Lead?
I need to send a fairly complex email, which will require a VF email template. All merge fields in the template will come from the
relatedTo object (case), nothing from recipient. These emails will be sent to an email-to-fax service, where the email-to-fax address is stored in a custom field on an account. When creating the email template in the UI, the options for Recipient Type are Contact, User, and Lead. And the documentation for
SingleEmailMessage.setTargetObjectId() says "Required if using a template, optional otherwise".
So, do I have any option besides creating a "dummy" contact on the affected accounts to stor the email-to-fax email address?