array_idx(&cmd->replies, i);
if (!reply->submitted)
return FALSE;
- i_assert(reply->content != NULL);
- if (reply->content->status / 100 == 2)
+ if (smtp_server_reply_is_success(reply))
success = TRUE;
}
return ret;
}
+bool smtp_server_reply_is_success(const struct smtp_server_reply *reply)
+{
+ i_assert(reply->content != NULL);
+ return (reply->content->status / 100 == 2);
+}
+
/*
* EHLO reply
*/
/* Reply the command with a 221 bye message */
void smtp_server_reply_quit(struct smtp_server_cmd_ctx *_cmd);
+bool smtp_server_reply_is_success(const struct smtp_server_reply *reply);
+
/* EHLO */
struct smtp_server_reply *