Verify mail server connection programmatically in ColdFusion
- by Sergii
I'm using custom SMTP servers and would like to verify the connection when user enters his own server credentials.
Exactly the same type of check as Adobe CF and Railo allow to do when adding mail server.
Sure, this does not guarantee that delivery will be working, but at least to check that entered server/username/pass are valid.
I can see one tricky way: try to send the email with cfmail and check the mail log. But I believe that it can be done with more elegant.
Is there any Java library available with standard ACF/Railo distro to help me? How would I use them? Examples are highly appreciated.
Thanks in advance.
EDIT:
Please don't be confused with Java tag present. Solution needed in CFML. Though it can use some Java libraries, if applicable.