smtp: Corrected result code for MAIL, RCPT and DATA commands
Bug: http://curl.haxx.se/mail/lib-2012-06/0094.html Reported by: Dan
This commit is contained in:
parent
861e1ba604
commit
a28cda3653
10
lib/smtp.c
10
lib/smtp.c
@ -1011,8 +1011,8 @@ static CURLcode smtp_state_mail_resp(struct connectdata *conn,
|
|||||||
(void)instate; /* no use for this yet */
|
(void)instate; /* no use for this yet */
|
||||||
|
|
||||||
if(smtpcode/100 != 2) {
|
if(smtpcode/100 != 2) {
|
||||||
failf(data, "Access denied: %d", smtpcode);
|
failf(data, "MAIL failed: %d", smtpcode);
|
||||||
result = CURLE_LOGIN_DENIED;
|
result = CURLE_SEND_ERROR;
|
||||||
state(conn, SMTP_STOP);
|
state(conn, SMTP_STOP);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1036,8 +1036,8 @@ static CURLcode smtp_state_rcpt_resp(struct connectdata *conn,
|
|||||||
(void)instate; /* no use for this yet */
|
(void)instate; /* no use for this yet */
|
||||||
|
|
||||||
if(smtpcode/100 != 2) {
|
if(smtpcode/100 != 2) {
|
||||||
failf(data, "Access denied: %d", smtpcode);
|
failf(data, "RCPT failed: %d", smtpcode);
|
||||||
result = CURLE_LOGIN_DENIED;
|
result = CURLE_SEND_ERROR;
|
||||||
state(conn, SMTP_STOP);
|
state(conn, SMTP_STOP);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1076,7 +1076,7 @@ static CURLcode smtp_state_data_resp(struct connectdata *conn,
|
|||||||
|
|
||||||
if(smtpcode != 354) {
|
if(smtpcode != 354) {
|
||||||
state(conn, SMTP_STOP);
|
state(conn, SMTP_STOP);
|
||||||
return CURLE_RECV_ERROR;
|
return CURLE_SEND_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SMTP upload */
|
/* SMTP upload */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user