time_t msgdate;
if (!msg) return;
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
msgdate = atol(msg->cm_fields[eTimestamp]);
}
else {
IAPuts(" NIL "); /* source route (not used) */
- if (msg->cm_fields[erFc822Addr] != NULL) {
+ if (!CM_IsEmpty(msg, erFc822Addr)) {
process_rfc822_addr(msg->cm_fields[erFc822Addr], user, node, name);
plain_imap_strout(user); /* mailbox name (user id) */
IAPuts(" ");
if (!msg) return;
/* Parse the message date into an IMAP-format date string */
- if (msg->cm_fields[eTimestamp] != NULL) {
+ if (!CM_IsEmpty(msg, eTimestamp)) {
msgdate = atol(msg->cm_fields[eTimestamp]);
}
else {
iaputs(&Imap->cached_body[pstart], pbytes);
if (msg != NULL) {
- CtdlFreeMessage(msg);
+ CM_Free(msg);
}
/* Mark this message as "seen" *unless* this is a "peek" operation */
*/
else if (!strcasecmp(Cmd->Params[i].Key, "BODYSTRUCTURE")) {
if ((msg != NULL) && (!body_loaded)) {
- CtdlFreeMessage(msg); /* need the whole thing */
+ CM_Free(msg); /* need the whole thing */
msg = NULL;
}
if (msg == NULL) {
IAPuts(")\r\n");
unbuffer_output();
if (msg != NULL) {
- CtdlFreeMessage(msg);
+ CM_Free(msg);
}
}