mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
smtp: Fixed space being sent in non --mail-rcpt based requests
Commands such as NOOP, RSET and HELP would be sent with a space at the end of the command, for example: "NOOP ".
This commit is contained in:
parent
2165298fe6
commit
8191800a0c
18
lib/smtp.c
18
lib/smtp.c
@ -563,16 +563,16 @@ static CURLcode smtp_perform_command(struct connectdata *conn)
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct SMTP *smtp = data->req.protop;
|
||||
|
||||
if(smtp->custom && smtp->custom[0] != '\0')
|
||||
/* Send the custom command */
|
||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s %s", smtp->custom,
|
||||
smtp->rcpt ? smtp->rcpt->data : "");
|
||||
else if(smtp->rcpt)
|
||||
/* Send the VRFY command */
|
||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "VRFY %s", smtp->rcpt->data);
|
||||
/* Send the command */
|
||||
if(smtp->rcpt)
|
||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s %s",
|
||||
smtp->custom && smtp->custom[0] != '\0' ?
|
||||
smtp->custom : "VRFY",
|
||||
smtp->rcpt->data);
|
||||
else
|
||||
/* Send the HELP command */
|
||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", "HELP");
|
||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s",
|
||||
smtp->custom && smtp->custom[0] != '\0' ?
|
||||
smtp->custom : "HELP");
|
||||
|
||||
if(!result)
|
||||
state(conn, SMTP_COMMAND);
|
||||
|
Loading…
Reference in New Issue
Block a user