You need to sign in to do that
Don't have an account?

System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_EMAIL_ADDRESS
i am calling apex email class from the flow with passing 4 parameters
public with sharing class opportunityFulfillmentEmail { @InvocableMethod public static void sentCsmEmail(List <flowInput> requests ) { flowInput req = requests[0]; List<string> toAddress = new List<string>(req.primaryEmail); List<string> toCCAddress = new List<string>(req.CcEmail); ID conId = req.contactId; // Query the fields we need to merge Opportunity opp = [SELECT Id, Billing_Contact_FirstName__c,Buying_Contact_FirstName__c FROM Opportunity WHERE Id=:req.oppId]; // Query the email template EmailTemplate emailTemplate = [SELECT Id,Subject,Body,HtmlValue FROM EmailTemplate WHERE Id=:req.templateId LIMIT 1]; // Process the merge fields String plainBody = emailTemplate.Body; plainBody = plainBody.replace('{!Opportunity.Billing_Contact_FirstName__c}', opp.Billing_Contact_FirstName__c); plainBody = plainBody.replace('{!Opportunity.Buying_Contact_FirstName__c}', opp.Buying_Contact_FirstName__c); String htmlBody = emailTemplate.HtmlValue; htmlBody = htmlBody.replace('{!Opportunity.Billing_Contact_FirstName__c}', opp.Billing_Contact_FirstName__c); htmlBody = htmlBody.replace('{!Opportunity.Buying_Contact_FirstName__c}', opp.Buying_Contact_FirstName__c); // Build the email message Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage(); message.setTemplateID(emailTemplate.Id); message.setSubject(emailTemplate.Subject); message.setPlainTextBody(plainBody); message.setHTMLBody(htmlBody); message.setToAddresses(toAddress); message.setCcAddresses(toCCAddress); message.setTargetObjectId(conId); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { Message }); } // Input details which comes to Apex class from flow public class flowInput { @InvocableVariable(required=true) public List<string> primaryEmail; @InvocableVariable(required=true) public List<string> CcEmail; @InvocableVariable(required=true) public id oppId; @InvocableVariable(required=true) public id contactId; @InvocableVariable(required=true) public id templateId; }I got this error even my list is not null
If you are looking for renting a car, on Ok Car Alquiler de Coches you'll find it. Check this website out okcar.es and compare offers!
http://www.agendatelefonos.com Is a site where you can find complete information about any company or business. Like for example: addresses and phone numbers about any companie in Spain.