In JavaMail api, Transport.send(Message) may throw a MessagingException if something goes wrong.
Transport.send(Message)
MessagingException
But I want to give the users some feedback