I'm going to generate and send password to user's mail. Of course, I want to do it safely.
Googling showed me that I can simply use smtps but system administrator told me that our post server doesn't support SSL. He said I should use pop3 and it uses SSL.
I know nothing about post protocols and have some questions:
1) Is it possible to send messages with POP3? I read that it's only for recieving messages.
2) As I understand after looking through java-mail code examples there is 2 ways of using safe smtp:
a) mail.ssl.enabled=true
b) mail.smtp.starttls.enable=true
Quote from documentation
In addition, the "imap" and "smtp" protocols support use of the STARTTLS command (see RFC 2487 and RFC 3501) to switch the connection to be secured by TLS.
Use of the STARTTLS command is preferred in cases where the server supports both SSL and non-SSL connections. - See more at: http://javamail.java.net/docs/SSLNOTES.txt#sthash.vcrMDaqh.dpuf
Does it mean I can use smtp
with starttls=true
even if post server doesn't support SSL?
I personally think that any modern post server supports SSL. It seems I misunderstood sysadmin. Unfortunately, I can't ask him right now due to some reasons.
I would be very grateful if somebody could clear up the situation.