문제

I'm trying to use Curl (actually libcurl) to list the emails in the Sent Mail directory of my gmail account.

The inbox directory works fine, however directories under [Gmail] don't, because square brackets aren't allowed in URLS. I've tried the -g flag, without any success.

.\curl.exe "imaps://imap.gmail.com:993/[Gmail]/Sent Mail" --cacert ".\cacert.pem" -u user:pass

Yields:

curl: (3) URL using bad/illegal format or missing URL

.\curl.exe "imaps://imap.gmail.com:993/[Gmail]/Sent Mail" --cacert ".\cacert.pem" -u user:pass -g

Yields:

curl: (3) [globbing] error: bad range specification after pos 29

Can anyone see how I'm going wrong?

도움이 되었습니까?

해결책 2

I provided this as a comment to my question, but I've managed to get it to work correctly now, and additionally percent encoding the space, by providing the -X flag for a custom IMAP request, to search for the email I was looking for.

다른 팁

Switch off globbing if you want to use [] in the URL.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top