Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Contact c = new Contact();
c.lastName = 'Andy The Customer';
c.Email = 'andy@theCustomerEmailAddress.com';
insert c;
Case theCase = new Case();
insert theCase;
EmailMessage theEmailMessage = new EmailMessage();
theEmailMessage.BccAddress = 'compliance@mostexcellentsoftware.com';
theEmailMessage.CcAddress = 'IaaSTeam@mostexcellentsoftware.com, SaaS@mostexcellentsoftware.com, PaaS@mostexcellentsoftware.com';
theEmailMessage.FromAddress = 'CustomerService@mostexcellentsoftware.com';
theEmailMessage.TextBody = 'Hello, I want to understand a few things about your SaaS offering.';
theEmailMessage.ParentId = theCase.Id;
theEmailMessage.toAddress = 'andy@theCustomerEmailAddress.com';
theEmailMessage.Subject = 'What is your SaaS Product Offering?';
insert theEmailMessage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.