commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pendell <>
Subject [email] Use of digest-MD5 with MultiPartEmail
Date Tue, 08 Dec 2015 18:16:54 GMT
So I'm reviewing the example demonstrating how to use org.apache.commons.mail SimpleEmail and
MultiPartEmail variants
listed here:

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.

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?


Brian P.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message