Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Access gmail with pycurl.
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Hongyi Zhao via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 29 Jun 2021 12:33:10 +0800
On Tue, Jun 29, 2021 at 5:55 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Sat, 26 Jun 2021, Hongyi Zhao via curl-library wrote:
>
> > I noticed that libcurl, hence pycurl supports IMAP and IMAPS, so I want to
> > know if I can use it to retrieve/remove emails from my Gmail account?
>
> Yes you can.
>
> Jay once wrote ShowGmailFolders.c for example:
>
> https://gist.github.com/jay/a43724c98220de85d020
Thank you for this wonderful code snippet. But for quick testing, I
try the following command based on the notes at
<http://cweiske.de/tagebuch/curl-imap-noauth.htm>, but failed:
$ curl -x socks5h://127.0.0.1:18888 -v -k --ssl
imaps://imap.gmail.com:993 --user "username:passwd"
* Trying 127.0.0.1:18888...
* TCP_NODELAY set
* SOCKS5 communication to imap.gmail.com:993
* SOCKS5 connect to imap.gmail.com:993 (remotely resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 18888 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to imap.gmail.com:993
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to
imap.gmail.com:993
Regards
Date: Tue, 29 Jun 2021 12:33:10 +0800
On Tue, Jun 29, 2021 at 5:55 AM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Sat, 26 Jun 2021, Hongyi Zhao via curl-library wrote:
>
> > I noticed that libcurl, hence pycurl supports IMAP and IMAPS, so I want to
> > know if I can use it to retrieve/remove emails from my Gmail account?
>
> Yes you can.
>
> Jay once wrote ShowGmailFolders.c for example:
>
> https://gist.github.com/jay/a43724c98220de85d020
Thank you for this wonderful code snippet. But for quick testing, I
try the following command based on the notes at
<http://cweiske.de/tagebuch/curl-imap-noauth.htm>, but failed:
$ curl -x socks5h://127.0.0.1:18888 -v -k --ssl
imaps://imap.gmail.com:993 --user "username:passwd"
* Trying 127.0.0.1:18888...
* TCP_NODELAY set
* SOCKS5 communication to imap.gmail.com:993
* SOCKS5 connect to imap.gmail.com:993 (remotely resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 18888 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to imap.gmail.com:993
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to
imap.gmail.com:993
Regards
-- Assoc. Prof. Hongyi Zhao <hongyi.zhao_at_gmail.com> Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering NO. 552 North Gangtie Road, Xingtai, China ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2021-06-29