You need to sign in to do that
Don't have an account?
Apex email error
Hello! I'm trying to send an email through Apex. Can anyone help me understand why the following code results in this error?
SendEmail failed. First exception on row 0; first error: INVALID_EMAIL_ADDRESS, Email address is invalid: : [toAddresses, ]
Code is below
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String sendEmailsTo = qcRequest.To_Emails__c;
String[] toAddresses = sendEmailsTo.split(';');
System.debug('Emails: ' + toAddresses);
mail.setToAddresses(toAddresses);
Thanks for any help you can provide!
SendEmail failed. First exception on row 0; first error: INVALID_EMAIL_ADDRESS, Email address is invalid: : [toAddresses, ]
Code is below
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String sendEmailsTo = qcRequest.To_Emails__c;
String[] toAddresses = sendEmailsTo.split(';');
System.debug('Emails: ' + toAddresses);
mail.setToAddresses(toAddresses);
Thanks for any help you can provide!
What is the output of the debug statement? That output might help us in finding the issue