My web application is installed on many customer servers and the app needs to send emails via SMTP. Email smtp server is configured by the customer via a text (Properties) file.
I am having trouble deciding which settings should be included in the file. For some servers it is enough to let customer specify the following:
mail.smtp.host =
mail.smtp.auth =
mail.smtp.user =
mail.smtp.pass =
mail.from =
But which settings will cover vast majority of servers, so I have no worries that some setting will be missing?
An obvious approach would be to look at other mailers like Thunderbird or Outlook and see what configuration options they provide.
You definitely need an option that controls the use of SSL, which has three values:
These correspond to various settings of the mail.smtp.ssl.enable and mail.smtp.starttls.enable properties.
If you haven’t already, you should look at all the properties described in the javadocs for the com.sun.mail.smtp package.
mail.smtp.auth should always be set to true.
That should get you started.