My goodjava.mail library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

My goodjava.mail library

fschmidt
Administrator
I had been using javax.mail to send emails from Luan.  But javax.mail is a huge mess, bigger than Luan itself.  I looked for a good SMTP Java library but of course there are none.  As usual, I just wrote my own.  Modern scum programmers can't write good code, so I am always better off writing my own.  So here it is.  The entire library is about 200 lines of code.

It is a thin layer on top of SMTP and MIME.  Modern scum programmers hate thin layers because they always think that they can do better than the underlying layer.  But this actually adds complexity and makes debugging more difficult for the user of the library.  My thin layer lets the user set the headers directly.  Does this mean that the user has to fully understand MIME headers?  No, not at all.  The user can just send himself an email of the type he wants using his favorite mail client, say gmail, and then when he receives the email, he can look at its source (with gmail "Show original").  Then he can just copy the headers into his code.  If the user is doing something complicated, then my thin layer gives him complete control to generate exactly whatever whatever complex email he wants.  With modern libraries with their disgusting thick layers, it is always a struggle to do anything complex.

Deuteronomy repeatedly says "You must purge the evil from you" and javax.mail is the last evil modern scum library that Luan depended on.  So now I have replaced all the evil Java libraries with my own code, so I have done what Deuteronomy asked me to do.