curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Looping though an IMAP-Folder, batch freezes

From: Nicklas Avén <nicklas.aven_at_jordogskog.no>
Date: Wed, 6 Mar 2019 13:52:05 +0100

Hi

What version of cUrl are you using. There was a change in the handling
of UID with version 7.62.0

You can see the discussion in this email with answers:

https://curl.haxx.se/mail/archive-2018-07/0006.html

and this issue:

https://github.com/curl/curl/issues/2789

I did get lost when handling UID in the old version.

Depending on what version you have and what behavior you expect those
things might trick you.

/Nicklas Avn

On 3/6/19 12:37 PM, Axel Humcke wrote:
>
> Hi,
>
> first at all i must say that i am completely new to curl.
>
> I want to use it as follows:
> - Connect to an IMAP-Folder
> - Loop Through the folder and export every email to a text file.
>
> Therefor I am creating and running the following .bat-file from an
> MS-Access-Application (VBA) with WshShell.Exec:
>
> /set Timestamp=2019-03-06_12-15-38_80//
> //for /l %%x in (2, 1, 69) do (//
> //curl --insecure --url "imaps://imap.ionos.de/INBOX;UID=%%x"
> --netrc-file [Path-to-file] -o cURL_FetchEmail_%Timestamp%_UID_%%x.txt//
> //move [Source-path]\cURL_FetchEmail_%Timestamp%_UID_%%x.txt
> [Destination-path]//
> //curl --insecure --url "imaps://imap.ionos.de/INBOX;UID=%%x"
> --netrc-file [Path-to-file] -X "UID STORE %%x -Flags \Deleted"//
> //)/
>
> If i start the .bat-file manually from the folder where it is created,
> it runs without problems. But when i start it with VBA it freezes
> after a few loops (The first few textfiles are created).
>
> There sure is a better way to do this like looping through the
> IMAP-Folder directly with the curl-command or sequence numbers? I
> didn't really get along with the syntax.
>
> Any help is appreciated.
>
> Kind regards,
> Axel
>
>
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-06