In winter’20 release Salesforce has introduced the new Undo Link on the Delete Record Toast. Now we can undo a deleted record in lightning experience without going to recycle bin.
Using renderStoredEmailTemplate(templateId, whoId, whatId) method of Messaging Class, we can send email to non-contacts using apex. Here is an example to send email to Opportunity owner.
Sample code:
//Send email to opportunity owner
Messaging.SingleEmailMessage mail = Messaging.renderStoredEmailTemplate(emailTemplateId, ownerId, opportunityId);
mail.setTargetObjectId(ownerId);
mail.setSubject(mail.getSubject());
mail.sethtmlBody(mail.gethtmlBody());
mail.saveAsActivity = false;
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});