Real Software Forums
http://forums.realsoftware.com/

Test email authentication with smtpsocket
http://forums.realsoftware.com/viewtopic.php?f=7&t=47655
Page 1 of 1

Author:  matt86 [ Sun Apr 21, 2013 7:58 am ]
Post subject:  Test email authentication with smtpsocket

Hello guys,
Is there a way to test email authentication with real studio?

I'm working on a Simple email client and when the user type smtp, port, username and password I want test if authentication, port and smtp are correct.

Thanks,
Matt

Author:  timhare [ Sun Apr 21, 2013 6:27 pm ]
Post subject:  Re: Test email authentication with smtpsocket

I usually send a test message to the user's email address as a way of testing the connection.

Author:  matt86 [ Mon Apr 22, 2013 12:28 am ]
Post subject:  Re: Test email authentication with smtpsocket

Hello timhare,
you've right but this isn't a "clean" way :-(

Author:  timhare [ Mon Apr 22, 2013 1:30 am ]
Post subject:  Re: Test email authentication with smtpsocket

Not sure what isn't "clean" about it. You could use a regular tcpsocket, connect to the smtp host/port and authenticate the user, but it's a lot more work and the user doesn't get the reassurance that something actually happened.

Author:  matt86 [ Mon Apr 22, 2013 1:44 am ]
Post subject:  Re: Test email authentication with smtpsocket

Thanks timhare,
is there a way to authenticate the user with tcpsocket?

Author:  msssltd [ Mon Apr 22, 2013 4:20 am ]
Post subject:  Re: Test email authentication with smtpsocket

matt86 wrote:
Thanks timhare,
is there a way to authenticate the user with tcpsocket?


There is no one 'standard' way to authenticate an SMTP connection. Many mail servers use similar authentication mechanisms but it's up to the mailserver sysadmin, to configure the various options available. The 'trend' is slowly moving towards insisting on TLS encryption, before or after initial connection and authentication; for which you will need the TCPSecureSocket and a bunch of time to re-invent wheels.

Author:  Akiland [ Mon May 06, 2013 2:52 am ]
Post subject:  Re: Test email authentication with smtpsocket

I've almost created a VERY simple function that does this to a NON SSL/TLS SMTP server...
Not much error checking going on since it's just a proof of concept...
Not done yet but let me know if you need it..
It uses Telnet in a shell :)

Author:  Akiland [ Mon May 06, 2013 6:28 am ]
Post subject:  Re: Test email authentication with smtpsocket

Here's the proof of concept thingy.
It can check if a username and password is valid for a given NON SSL/TLS SMTP server :)
It can be expanded to check SSL/TLS too but I didn't have time for that now.
It can be improved a lot, but as I said, proof of concept..

https://www.box.com/s/xddemsv9xwpyr2s3gqhk

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/