You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Brian Pendell <Br...@MINIBARNA.com> on 2015/12/08 19:16:54 UTC
[email] Use of digest-MD5 with MultiPartEmail
So I'm reviewing the example demonstrating how to use org.apache.commons.mail SimpleEmail and MultiPartEmail variants
listed here:
https://commons.apache.org/proper/commons-email/userguide.html
It's fairly straightforward and I can get the example to work.
However, I do not want to store my password in cleartext. Apache Tomcat allows the use of digested passwords
In web site authentication, so I assume there is a similar mechanism for SMTP as well.
What I do not see anywhere is a simple, easy tutorial describing how to implement this function. I want to hash the password and store it, then at the proper time pass it on as part of the authentication. I also need the SMTP server to understand that I am sending it a digested password; if it expects cleartext, it will of course fail to authenticate.
A review of the Wiki discussion on SMTP authentication suggests there are no less than three ways to accomplish this: To indicate that I want to use CRAM-MD5, MD5, or DIGEST-MD5 as an authentication method.
https://en.wikipedia.org/wiki/SMTP_Authentication
What I'm not seeing is how to modify the Apache example to use one of these forms of authentication.
Is there a simple , easy-to-use example which will help me get this done?
Respectfully,
Brian P.