- if (StrLength(Tmpl) > 0)
- read_message(WCC->WBuf, SKEY(Tmpl), msgnum, NULL);
- else
- read_message(WCC->WBuf, HKEY("view_message"), msgnum, NULL);
+ switch (WCC->eReqType)
+ {
+ case eGET:
+ case ePOST:
+ Tmpl = sbstr("template");
+ if (StrLength(Tmpl) > 0)
+ read_message(WCC->WBuf, SKEY(Tmpl), msgnum, NULL, &Mime);
+ else
+ read_message(WCC->WBuf, HKEY("view_message"), msgnum, NULL, &Mime);
+ http_transmit_thing(ChrPtr(Mime), 0);
+ break;
+ case eDELETE:
+ CmdBuf = NewStrBuf ();
+ if (WCC->wc_is_trash) { /** Delete from Trash is a real delete */
+ serv_printf("DELE %ld", msgnum);
+ }
+ else { /** Otherwise move it to Trash */
+ serv_printf("MOVE %ld|_TRASH_|0", msgnum);
+ }
+ StrBuf_ServGetln(CmdBuf);
+ FlushStrBuf(WCC->ImportantMsg);
+ StrBufAppendBuf(WCC->ImportantMsg, CmdBuf, 4);
+ break;
+ default:
+ break;
+
+ }