aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2012-06-24 22:40:17 +0100
committerSteve Holme <steve_holme@hotmail.com>2012-06-24 22:40:17 +0100
commita28cda3653e72a4c6bd02ce50d0336943fcf3a14 (patch)
treeb8f3a6d3ecfa4bcbb6ec69e7ebe2f7a925413dff
parent861e1ba604ab5f3b58fa5dcb02dce8024f26a75d (diff)
smtp: Corrected result code for MAIL, RCPT and DATA commands
Bug: http://curl.haxx.se/mail/lib-2012-06/0094.html Reported by: Dan
-rw-r--r--lib/smtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 2e03faf2b..81c069f7d 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -1011,8 +1011,8 @@ static CURLcode smtp_state_mail_resp(struct connectdata *conn,
(void)instate; /* no use for this yet */
if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ failf(data, "MAIL failed: %d", smtpcode);
+ result = CURLE_SEND_ERROR;
state(conn, SMTP_STOP);
}
else {
@@ -1036,8 +1036,8 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
(void)instate; /* no use for this yet */
if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ failf(data, "RCPT failed: %d", smtpcode);
+ result = CURLE_SEND_ERROR;
state(conn, SMTP_STOP);
}
else {
@@ -1076,7 +1076,7 @@ static CURLcode smtp_state_data_resp(struct connectdata *conn,
if(smtpcode != 354) {
state(conn, SMTP_STOP);
- return CURLE_RECV_ERROR;
+ return CURLE_SEND_ERROR;
}
/* SMTP upload */