Has anyone written a "Secure" SMTP server or client recently ?
I wrote some normal SMTP functions years ago, and discovered ( after reusing the code yesterday ) that Googlemail for example now requires TLS with SMTP .
STARTTLS initiates encrypted hand-shaking between client and server.
Just wondering whether anyone has already done this ?
... or can .Net provide the functionality for this ?
SMTP Service Extension for Secure SMTP over TLS
http://www.rfc-editor.org/rfc/rfc2487.txt
Wiki - STARTTLS
http://en.wikipedia.org/wiki/STARTTLS
The Transport Layer Security (TLS) Protocol
http://tools.ietf.org/html/rfc5246
Secure SMTP using STARTTLS
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
Re: Secure SMTP using STARTTLS
Hi Phil,
did you get any answer or have you found a solution? I'm looking at the same problem right now ;)
Thanks
Michael
did you get any answer or have you found a solution? I'm looking at the same problem right now ;)
Thanks
Michael
Re: Secure SMTP using STARTTLS
Hi Michael,
I didn't bother to follow it up as I expected that someone might answer , thus saving time & effort. Seems as if nobody has been there yet.
Cheers
Phil
I didn't bother to follow it up as I expected that someone might answer , thus saving time & effort. Seems as if nobody has been there yet.
Cheers
Phil
Re: Secure SMTP using STARTTLS
Thanks, Phil. How sad :((
Is anyone from Dyalog listening? This should be a project for one of your youngsters - it can't be that "nobody has ever been there" (in 2014)!
Cheers
Michael
Is anyone from Dyalog listening? This should be a project for one of your youngsters - it can't be that "nobody has ever been there" (in 2014)!
Cheers
Michael
Re: Secure SMTP using STARTTLS
Michael,
I agree , although my guess is that most people are probably using DotNet these days .. where the "wheel" doesn't have to be reinvented but is available in some Library.
Hint .. some input or tips from the Dyalog guys would be helpful here.
;-)
I agree , although my guess is that most people are probably using DotNet these days .. where the "wheel" doesn't have to be reinvented but is available in some Library.
Hint .. some input or tips from the Dyalog guys would be helpful here.
;-)
-
- Posts: 439
- Joined: Wed Oct 01, 2008 9:39 am
Re: Secure SMTP using STARTTLS
Hi Phil,
I found this webpage which may be of interest:
http://msdn.microsoft.com/en-us/library/system.security.authentication.sslprotocols(v=vs.110).aspx
Regards,
Vince
[Post updated to fix URL - thanks Phil!]
I found this webpage which may be of interest:
http://msdn.microsoft.com/en-us/library/system.security.authentication.sslprotocols(v=vs.110).aspx
Regards,
Vince
[Post updated to fix URL - thanks Phil!]
Re: Secure SMTP using STARTTLS
Thanks Vince .. dead-link somehow.
I guess you meant this one ?
http://msdn.microsoft.com/en-us/library/system.security.authentication.sslprotocols(v=vs.110).aspx
Seems that .net Framework 4.5 supports TLSv1.2
I guess you meant this one ?
http://msdn.microsoft.com/en-us/library/system.security.authentication.sslprotocols(v=vs.110).aspx
Seems that .net Framework 4.5 supports TLSv1.2
Re: Secure SMTP using STARTTLS
The following should help (requires .net 4.5)
⎕USING←'System.Net.Mail,System.dll' 'System,System.dll' 'System.Net,system.dll'
MyMail←MailMessage.New ⍬
MyMail.To.Add ⎕NEW MailAddress,⊂'bill@microsoft.com'
MyMail.From←⎕NEW MailAddress,⊂'sales@dyalog.com'
MyMail.Subject←'Your 500 licences of Dyalog APL'
MyMail.Body←'Thanks, Bill. Nice to see you returning to APL :)'
Mailer←⎕NEW SmtpClient(,⊂'smtp.dyalog.com')(587) ⍝ SMTP-Server and port
Mailer.EnableSSL←1
Cred←⎕NEW NetworkCredential('smtp_USERNAME' 'smtp_PASSWORD')
Mailer.UseDefaultCredentials←0
Mailer.Credentials←Cred
Mailer.Send MyMail
- Dick Bowman
- Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
- Contact:
Re: Secure SMTP using STARTTLS
That didn't quite work for me (LENGTH ERRORs) needed to change lines...
to
Code: Select all
MyMail.To.Add ⎕NEW MailAddress,⊂'bill@microsoft.com'
MyMail.From←⎕NEW MailAddress,⊂'sales@dyalog.com'
to
Code: Select all
MyMail.To.Add ⎕NEW MailAddress (⊂'bill@microsoft.com')
MyMail.From←⎕NEW MailAddress (⊂'sales@dyalog.com')
Visit http://apl.dickbowman.com to read more from Dick Bowman