I want to send mail to only tls enabled receiver. If mentioned email id is not tls enabled and due to which mail was not send then i want that kind of response message (like string boolean anything).
Please guide me with appropriate solution for above problem defination
--Thanks & regards
Normally you'll send your messages to your local mail server. It either uses TLS or it doesn't; you should know its configuration. How that mail server sends the message on to the recipient's mail server is unknowable.
If you want to allow your user to configure which mail server to use, and you want to always use TLS when talking to that mail server, you can use the mail.smtp.starttls.required property. Or set mail.smtp.ssl.enable to true to ensure you're always using SSL to talk to the mail server.