Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Jul 23, 2017 5:35 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Test email authentication with smtpsocket
PostPosted: Sun Apr 21, 2013 7:58 am 
Offline

Joined: Sun Apr 11, 2010 4:33 am
Posts: 102
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Sun Apr 21, 2013 6:27 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
I usually send a test message to the user's email address as a way of testing the connection.


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon Apr 22, 2013 12:28 am 
Offline

Joined: Sun Apr 11, 2010 4:33 am
Posts: 102
Hello timhare,
you've right but this isn't a "clean" way :-(


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon Apr 22, 2013 1:30 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon Apr 22, 2013 1:44 am 
Offline

Joined: Sun Apr 11, 2010 4:33 am
Posts: 102
Thanks timhare,
is there a way to authenticate the user with tcpsocket?


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon Apr 22, 2013 4:20 am 
Offline
User avatar

Joined: Fri Oct 28, 2005 7:05 am
Posts: 565
Location: Emsworth, UK
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.

_________________
Yes it's me in the avatar


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon May 06, 2013 2:52 am 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
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 :)

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
 Post subject: Re: Test email authentication with smtpsocket
PostPosted: Mon May 06, 2013 6:28 am 
Offline
User avatar

Joined: Tue Jan 04, 2011 3:02 am
Posts: 1236
Location: Jönköping, Sweden
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

_________________
Image http://www.linkedin.com/in/albinkiland
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8
Xojo Pro 2013r1


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group