code: private void sendEmail(Message m, SendRawEmailRequest req)
              throws SendFailedException, MessagingException {
  
          Address[] sent = null;
          Address[] unsent = null;
          Address[] invalid = null;
  
          try {
              appendUserAgent(req, USER_AGENT);
              SendRawEmailResult resp = this.emailService.sendRawEmail(req);
              lastMessageId = resp.getMessageId();
              sent = m.getAllRecipients();
              unsent = new Address[0];
              invalid = new Address[0];
              super.notifyTransportListeners(TransportEvent.MESSAGE_DELIVERED,
                      sent, unsent, invalid, m);
          } catch (Exception e) {
              sent = new Address[0];
              unsent = m.getAllRecipients();
              invalid = new Address[0];
              super.notifyTransportListeners(
                      TransportEvent.MESSAGE_NOT_DELIVERED, sent, unsent,
                      invalid, m);
              throw new SendFailedException("Unable to send email", e, sent,
                      unsent, invalid);
          }
      }
docs: Sends an email using AWS E-mail Service and notifies listeners
  
  @param m
  Message used to notify users
  @param req
  Raw email to be sent