Skip to main content
deleted 8 characters in body
Source Link
manjit5190
  • 8.1k
  • 17
  • 34

errrors is a list of SendEmailError. You can Iterate and collect errors:

for (Messaging.SendEmailResult mr : mrs) 
{
    if (mr.isSuccess()) {
        //Do something for success
    }  else {
        // Operation failed, so get all errors                
        for(Messaging.SendEmailError err : mr.getErrors()) {
            System.debug('The following error has occurred.');                    
            System.debug(err.getStatusCode() + ': ' + err.getMessage());
            System.debug('Account fields'fields that affected this error: ' + err.getFields());
        }
    }
}

See methods for SendEmailError here.

errrors is a list of SendEmailError. You can Iterate and collect errors:

for (Messaging.SendEmailResult mr : mrs) 
{
    if (mr.isSuccess()) {
        //Do something for success
    }  else {
        // Operation failed, so get all errors                
        for(Messaging.SendEmailError err : mr.getErrors()) {
            System.debug('The following error has occurred.');                    
            System.debug(err.getStatusCode() + ': ' + err.getMessage());
            System.debug('Account fields that affected this error: ' + err.getFields());
        }
    }
}

See methods for SendEmailError here.

errrors is a list of SendEmailError. You can Iterate and collect errors:

for (Messaging.SendEmailResult mr : mrs) 
{
    if (mr.isSuccess()) {
        //Do something for success
    }  else {
        // Operation failed, so get all errors                
        for(Messaging.SendEmailError err : mr.getErrors()) {
            System.debug('The following error has occurred.');                    
            System.debug(err.getStatusCode() + ': ' + err.getMessage());
            System.debug('fields that affected this error: ' + err.getFields());
        }
    }
}

See methods for SendEmailError here.

Source Link
manjit5190
  • 8.1k
  • 17
  • 34

errrors is a list of SendEmailError. You can Iterate and collect errors:

for (Messaging.SendEmailResult mr : mrs) 
{
    if (mr.isSuccess()) {
        //Do something for success
    }  else {
        // Operation failed, so get all errors                
        for(Messaging.SendEmailError err : mr.getErrors()) {
            System.debug('The following error has occurred.');                    
            System.debug(err.getStatusCode() + ': ' + err.getMessage());
            System.debug('Account fields that affected this error: ' + err.getFields());
        }
    }
}

See methods for SendEmailError here.