/* * Fetch the INTERNALDATE of the messages. */ int request_fetchdate(session *ssn, const char *mesg, char **date) { int t, r; TRY(t = send_request(ssn, "UID FETCH %s INTERNALDATE", mesg)); TRY(r = response_fetchdate(ssn, t, date)); return r; }
/* * Fetch the INTERNALDATE of the messages. */ int request_fetchdate(const char *server, const char *port, const char *user, const char *mesg, char **date) { int t, r; session *s; if (!(s = session_find(server, port, user))) return -1; t = imap_fetch(s, mesg, "INTERNALDATE"); if ((r = response_fetchdate(s, t, date)) == -1) goto fail; return r; fail: close_connection(s); session_destroy(s); return -1; }