]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtp.c
SMTP: when we did the login and replied, we mustn't try again to process the...
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index be6347466270576c957d1610d8c29e1d3b5a961c..6dcf9c2b5a92bf9d09f190108c6d244e77d196f5 100644 (file)
@@ -619,7 +619,7 @@ void smtp_mail(long offset, long flags) {
         * address so we don't have to contend with the empty string causing
         * other code to fail when it's expecting something there.
         */
-       if (StrLength(sSMTP->from)) {
+       if (StrLength(sSMTP->from) == 0) {
                StrBufPlain(sSMTP->from, HKEY("someone@example.com"));
        }
 
@@ -1007,14 +1007,17 @@ void smtp_command_loop(void)
 
        if (sSMTP->command_state == smtp_user) {
                smtp_get_user(0);
+               return;
        }
 
        else if (sSMTP->command_state == smtp_password) {
                smtp_get_pass(0, 0);
+               return;
        }
 
        else if (sSMTP->command_state == smtp_plain) {
                smtp_try_plain(0, 0);
+               return;
        }
 
        pchs = pch = ChrPtr(sSMTP->Cmd);