diff --git a/src/java/davmail/smtp/SmtpConnection.java b/src/java/davmail/smtp/SmtpConnection.java index 38ad9db3..fc5f00cf 100644 --- a/src/java/davmail/smtp/SmtpConnection.java +++ b/src/java/davmail/smtp/SmtpConnection.java @@ -123,6 +123,8 @@ public class SmtpConnection extends AbstractConnection { state = State.STARTMAIL; recipients.clear(); sendClient("250 Sender OK"); + } else if (state == State.INITIAL) { + sendClient("503 Authentication required"); } else { state = State.INITIAL; sendClient("503 Bad sequence of commands");