Page 1 of 1

Is it possible to delete a mail using cURL ?

Posted: 29 Jan 2015 10:05
by Tonton Luc
Hi,

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:

Posted: 23 Feb 2015 16:16
by Jan de Lint
Tonton,
- 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.
]an