aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-12-25 22:50:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-12-25 22:50:11 +0000
commita2182359646f8f7ee457aec75f45e36f016c3b0f (patch)
tree5409648957c6e860a8e013e6547496ed294e02bd /lib
parent73ad32e1252af34de0df8ae0c41bc0694cff9e47 (diff)
first shot at actually doing the SMTP upload as well, not doing the proper
end-of-body treatment
Diffstat (limited to 'lib')
-rw-r--r--lib/smtp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 074d9e7db..44e405ed5 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -321,7 +321,7 @@ static CURLcode smtp_mail(struct connectdata *conn)
struct SessionHandle *data = conn->data;
/* send MAIL */
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:<%s>",
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s",
data->set.str[STRING_MAIL_FROM]);
if(result)
return result;
@@ -346,7 +346,7 @@ static CURLcode smtp_state_mail_resp(struct connectdata *conn,
}
else {
/* send RCPT TO */
- result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:<%s>",
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "RCPT TO:%s",
data->set.str[STRING_MAIL_RCPT]);
if(result)
return result;
@@ -392,15 +392,14 @@ static CURLcode smtp_state_data_resp(struct connectdata *conn,
(void)instate; /* no use for this yet */
- if(smtpcode/100 != 2) {
+ if(smtpcode != 354) {
state(conn, SMTP_STOP);
return CURLE_RECV_ERROR;
}
/* SMTP upload */
- result=Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE,
- smtp->bytecountp,
- -1, NULL); /* no upload here */
+ result = Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */
+ FIRSTSOCKET, smtp->bytecountp);
state(conn, SMTP_STOP);
return result;