Skip to main content
Switched to blockquote so the lines would wrap.
Source Link
Daniel Ballinger
  • 103k
  • 40
  • 275
  • 601

I am writing code to send emails to contacts via Apex using templates. My issue is that I need to be able to copy these emails to various other users that are going to be determined at run time. This is not currently allowed: (see here) http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound_single.htm

setBccAddresses(String[]) 
Optional. A list of blind carbon copy (BCC) addresses. The maximum allowed is   25. This argument is allowed only when a template is not used.
setCcAddresses(String[]) 
Optional. A list of carbon copy (CC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

setBccAddresses(String[])
Optional. A list of blind carbon copy (BCC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

setCcAddresses(String[])
Optional. A list of carbon copy (CC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

Does anyone have any ideas for a workaround?

Thank you!

I am writing code to send emails to contacts via Apex using templates. My issue is that I need to be able to copy these emails to various other users that are going to be determined at run time. This is not currently allowed: (see here) http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound_single.htm

setBccAddresses(String[]) 
Optional. A list of blind carbon copy (BCC) addresses. The maximum allowed is   25. This argument is allowed only when a template is not used.
setCcAddresses(String[]) 
Optional. A list of carbon copy (CC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

Does anyone have any ideas for a workaround?

Thank you!

I am writing code to send emails to contacts via Apex using templates. My issue is that I need to be able to copy these emails to various other users that are going to be determined at run time. This is not currently allowed: (see here) http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound_single.htm

setBccAddresses(String[])
Optional. A list of blind carbon copy (BCC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

setCcAddresses(String[])
Optional. A list of carbon copy (CC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

Does anyone have any ideas for a workaround?

Thank you!

Source Link
hgolov
  • 823
  • 2
  • 13
  • 30

SingleMessage with TemplateId in Apex: need to add more recipients

I am writing code to send emails to contacts via Apex using templates. My issue is that I need to be able to copy these emails to various other users that are going to be determined at run time. This is not currently allowed: (see here) http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_outbound_single.htm

setBccAddresses(String[]) 
Optional. A list of blind carbon copy (BCC) addresses. The maximum allowed is   25. This argument is allowed only when a template is not used.
setCcAddresses(String[]) 
Optional. A list of carbon copy (CC) addresses. The maximum allowed is 25. This argument is allowed only when a template is not used.

Does anyone have any ideas for a workaround?

Thank you!