Discussions related to Visual Prolog
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Is it possible to delete a mail using cURL ?

Unread post by Tonton Luc »


I've tried this following code without succes :

Code: Select all

  startCase(Action,_) :-           Action = 4,         try             ResultStream = outputStream_String::new(),             Connection = vPcURL::new(ResultStream, caseCompletion, Action),             _ = Connection:curl_easy_setopt(cURLOPT_USERPWD, s("xxx.xxx@xxx.com:my_passwd")),             _ = Connection:curl_easy_setopt(cURLOPT_URL, s("pop3://mail.xxx.com/1")), % first mail             _ = Connection:curl_easy_setopt(cURLOPT_CUSTOMREQUEST, s("DELE")),             _ = Connection:curl_easy_setopt(cURLOPT_NOBODY, i(1)),             _ = Connection:curl_easy_perform()         catch _ do             taskWindow::ecri_log(string::format("startCase % not ok.", Action)),             succeed()         end try.
any :idea:
User avatar
Jan de Lint
VIP Member
Posts: 77
Joined: 6 Mar 2000 0:01

Unread post by Jan de Lint »

- after all, it is probably not a good idea to use a try/catch with VPcURL since curl throws no errors.
- I think the DELE only sets a delete flag. This should be followed by a command something like PURGE to actually delete.
Post Reply