New NamedDataSource by kosinal · Pull Request #50 · bbottema/simple-java-mail

I had a problem, when I used FileDataSource, but I need to rename it due to security (sending ps1, tmp or vbs files). When I used addAttachemnt("fixedName", new FileDataSource(...)).
The problem is in the DataHandler.getName, which use the name of the data source.

When I created wrapper NamedDataSource, I am able to rename the file and I can use the original name as well.