bbottema / simple-java-mail

Simple API, Complex Emails (Jakarta Mail smtp wrapper)
http://www.simplejavamail.org
Apache License 2.0
1.22k stars 266 forks source link

fixed exception handling for acquireTransport #524

Open rahulbhawsar opened 4 months ago

rahulbhawsar commented 4 months ago

Hi, Please review these changes, below are the changes

  1. returning null as, Optional.ofNullable() will skip the next mapping and throw an exception if the value is null.
  2. apart from InterruptedException, other exceptions can also occure hence used generic Exception. ( for example allocate can throw an exception)

thanks,