Verify mail server connection programmatically in ColdFusion

Posted by Sergii on Stack Overflow See other posts from Stack Overflow or by Sergii
Published on 2010-04-22T08:15:43Z Indexed on 2010/04/23 2:33 UTC
Read the original article Hit count: 379

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about railo