SidneyShaw / simple-java-mail

Automatically exported from code.google.com/p/simple-java-mail
0 stars 0 forks source link

Patch for /trunk/src/main/java/org/codemonkey/simplejavamail/Recipient.java #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Allow use of this class outside package

Original issue reported on code.google.com by b.pons...@gmail.com on 28 Jun 2012 at 4:47

Attachments:

GoogleCodeExporter commented 9 years ago
The reason that class is not public is deliberate: to keep the API as simple as 
possible and keep the scope of the library clear. By making this public you 
start exposing the old Java Mail library to the use which is exactly what I 
intended to prevent by providing a much simpler interface instead.

However, it is quite possible simple Java Mail should expose some specific 
information currently held private (like some fields of the recipient class). 
What do you need?

Original comment by b.bottema on 29 Jun 2012 at 2:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i need to retrieve recipient name and email to do some logging before sending 
email. 

the class is final, and had only getters, what's the matter of exposing it ? it 
didn't complexify the project

Original comment by b.pons...@gmail.com on 29 Jun 2012 at 2:21

GoogleCodeExporter commented 9 years ago
Agreed, I mistakenly thought we we're talking about exposing the sun's Java 
Mail Recipient type, not our own, org.codemonkey.simplejavamail.Recipient.

Indeed, it is a bug that this class is not public. Calling 
email.getRecipients() won't even compile. I fixed this in the new release 2.1.

Original comment by b.bottema on 29 Jun 2012 at 2:59