summaryrefslogtreecommitdiff
path: root/imap/src/c-client/smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap/src/c-client/smtp.c')
-rw-r--r--imap/src/c-client/smtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/imap/src/c-client/smtp.c b/imap/src/c-client/smtp.c
index 47c7e5a6..1c72670c 100644
--- a/imap/src/c-client/smtp.c
+++ b/imap/src/c-client/smtp.c
@@ -437,10 +437,11 @@ long smtp_mail (SENDSTREAM *stream,char *type,ENVELOPE *env,BODY *body)
(stream->netstream->dtb ==
(NETDRIVER *) mail_parameters (NIL,GET_SSLDRIVER,NIL)) ?
"/ssl" : "");
- do { /* make sure stream is in good shape */
- smtp_send (stream,"RSET",NIL);
+ do {
if (retry) { /* need to retry with authentication? */
NETMBX mb;
+ /* make sure stream is in good shape */
+ smtp_send (stream,"RSET",NIL);
/* yes, build remote name for authentication */
mail_valid_net_parse (smtpserver,&mb);
if (!smtp_auth (stream,&mb,smtpserver)) return NIL;