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 ) ; }
Sends a SimpleMailMessage .