[Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
Hi, I am trying to use Haskell to download email/attachments from gmail. For which I am exploring Network.TLS. I got this sample from the net that connects to gmail smtp and works just fine - http://hpaste.org/82890 However, when I modify it a bit to try to connect to imap, it simply does not

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread satvik chauhan
You can use HaskellNet http://hackage.haskell.org/package/HaskellNet or imapget http://hackage.haskell.org/package/imapget directly or look into their source code for connecting to imap manually. -Satvik On Sat, Feb 23, 2013 at 8:58 PM, C K Kashyap ckkash...@gmail.com wrote: Hi, I am trying

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
The reason I want to use TLS is that I'd want to pack the whole thing in a DLL and give it off to a friend for use. What I am really looking for is a small sample code that demonstrates how TLS package can be used to connect to a webserver or imapserver. Regards, Kashyap On Sat, Feb 23, 2013

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread Brandon Allbery
On Sat, Feb 23, 2013 at 1:58 PM, C K Kashyap ckkash...@gmail.com wrote: What I am really looking for is a small sample code that demonstrates how TLS package can be used to connect to a webserver or imapserver. TLS isn't actually SSL, despite SSL getting blessed as TLS 0.9. Various attempts

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread Vincent Hanquez
On 02/23/2013 06:58 PM, C K Kashyap wrote: The reason I want to use TLS is that I'd want to pack the whole thing in a DLL and give it off to a friend for use. What I am really looking for is a small sample code that demonstrates how TLS package can be used to connect to a webserver or

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread Jason Dusek
2013/2/23 C K Kashyap ckkash...@gmail.com: The reason I want to use TLS is that I'd want to pack the whole thing in a DLL and give it off to a friend for use. Why does this requirement compel you to forego the imapget or HaskellNet packages? -- Jason Dusek pgp // solidsnack //

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread Vincent Hanquez
On 02/23/2013 09:05 PM, Brandon Allbery wrote: On Sat, Feb 23, 2013 at 1:58 PM, C K Kashyap ckkash...@gmail.com wrote: What I am really looking for is a small sample code that demonstrates how TLS package can be used to connect to a webserver or imapserver. TLS isn't actually SSL, despite

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread Vincent Hanquez
On 02/23/2013 03:28 PM, C K Kashyap wrote: Hi, I am trying to use Haskell to download email/attachments from gmail. For which I am exploring Network.TLS. I got this sample from the net that connects to gmail smtp and works just fine - http://hpaste.org/82890 Your example look odd, Typically

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
What I am looking to achieve is - create a DLL that would do the complete gmail thing that could be linked to a standard C program (on windows) and could be used to download emails from gmail. What I gathered from HsOpenSSL (which is required for HaskellNet) depends on some native ssl dll

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
Thank you so much Vincent, I think this is what I need ... I tried to use it to connect to a local web server running in 443 - http://hpaste.org/82943 however, I get the following error - ssl_client.hs: connect: failed (Connection refused (WSAECONNREFUSED)) Am I missing something? Regards,

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
Okay ... looks like connection is exactly what I want The examples work just fine on Linux .. however, on Windows, I continue to get the WSACONNECTIONREFUSED eror. Even adding a withSocketsDo does not seem to help. Regards, Kashyap On Sun, Feb 24, 2013 at 8:58 AM, C K Kashyap

Re: [Haskell-cafe] Need urgent help with Network.tls

2013-02-23 Thread C K Kashyap
Okay ... now magically, I stopped seeing the WSACONNECTIONREFUSED error!!! .. Regards, Kashyap On Sun, Feb 24, 2013 at 10:03 AM, C K Kashyap ckkash...@gmail.com wrote: Okay ... looks like connection is exactly what I want The examples work just fine on Linux .. however, on Windows, I