code: public void sendMail(String from, String replyTo, String[] to, String[] cc,
                           String[] bcc, String subject, String msg) throws Exception {
  
          SimpleMailMessage simpleMailMassage = new SimpleMailMessage();
  
          // fallback to default mail sender
          if (from == null || from.isEmpty()) {
              from = defaultMailSender;
          }
  
          simpleMailMassage.setFrom(from);
          simpleMailMassage.setReplyTo(replyTo);
          simpleMailMassage.setTo(to);
          simpleMailMassage.setBcc(bcc);
          simpleMailMassage.setCc(cc);
          simpleMailMassage.setSubject(subject);
          simpleMailMassage.setText(msg);
  
          sendMail(simpleMailMassage);
      }
docs: Sends a SimpleMailMessage.
  
  @param from    The mail sender address.
  @param replyTo The reply to address.
  @param to      A list of mail recipient addresses.
  @param cc      A list of carbon copy mail recipient addresses.
  @param bcc     A list of blind carbon copy mail recipient addresses.
  @param subject The mail subject.
  @param msg     The mail message text.
  @throws Exception