class EmailComponent implements HtmlEmailSender {
  
  @Value("${config.emailSender}")
  private String emailSender;

  @Inject
  private EmailModule defaultEmailSender;

  @Inject
  private EmailModule sesEmailSender;

  @Override
  public void send(Email email) throws Exception {<FILL_FUNCTION_BODY>}

  @Override
  public void setEmailConfig(EmailConfig emailConfig) {
    switch(emailSender) 
    { 
        case "default": 
          defaultEmailSender.setEmailConfig(emailConfig);
            break; 
        case "ses": 
          sesEmailSender.setEmailConfig(emailConfig);
            break; 
        default: 
 
    }
    
  }



}

    switch(emailSender) 
    { 
        case "default": 
          defaultEmailSender.send(email);
            break; 
        case "ses": 
          sesEmailSender.send(email);
            break; 
        default: 
            throw new Exception("No email implementation for " + emailSender); 
    }
    
  
<no_super_class>