aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/smtp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index 977d323a7..bb29a83cf 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -791,7 +791,11 @@ static CURLcode smtp_mail(struct connectdata *conn)
struct SessionHandle *data = conn->data;
/* send MAIL FROM */
- if(data->set.str[STRING_MAIL_FROM][0] == '<')
+ if(!data->set.str[STRING_MAIL_FROM])
+ /* null reverse-path, RFC-2821, sect. 3.7 */
+ result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:<>");
+
+ else if(data->set.str[STRING_MAIL_FROM][0] == '<')
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "MAIL FROM:%s",
data->set.str[STRING_MAIL_FROM]);
else