Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void testmethod testEmails()
- {
- // prep data
- // attempt to send email
- try
- {
- /* code that calls Messaging.sendEmail */
- }
- catch (EmailException e)
- {
- // ignore if Single Emails aren't configured yet
- if (e.getMessage().contains('Single email must be enabled')) {}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement