On Tue, Jun 29, 2021 at 5:55 AM Daniel Stenberg <dan...@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.z...@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.html

Reply via email to