mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
win32/sendmail.c/SendText(): move posting of DATA prior to stripped header computation
Removes some error handling and work if it fails
This commit is contained in:
@@ -504,6 +504,14 @@ static int SendText(char *RPath, const char *Subject, const char *mailTo, const
|
||||
efree(tempMailTo);
|
||||
}
|
||||
|
||||
if (!Post("DATA\r\n")) {
|
||||
return (FAILED_TO_SEND);
|
||||
}
|
||||
if ((res = Ack(&server_response)) != SUCCESS) {
|
||||
SMTP_ERROR_RESPONSE(server_response);
|
||||
return (res);
|
||||
}
|
||||
|
||||
/* Send mail to all Bcc rcpt's
|
||||
This is basically a rip of the Cc code above.
|
||||
Just don't forget to remove the Bcc: from the header afterwards. */
|
||||
@@ -578,20 +586,6 @@ static int SendText(char *RPath, const char *Subject, const char *mailTo, const
|
||||
}
|
||||
}
|
||||
|
||||
if (!Post("DATA\r\n")) {
|
||||
if (stripped_header) {
|
||||
efree(stripped_header);
|
||||
}
|
||||
return (FAILED_TO_SEND);
|
||||
}
|
||||
if ((res = Ack(&server_response)) != SUCCESS) {
|
||||
SMTP_ERROR_RESPONSE(server_response);
|
||||
if (stripped_header) {
|
||||
efree(stripped_header);
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
/* send message header */
|
||||
if (Subject == NULL) {
|
||||
res = PostHeader(RPath, "No Subject", mailTo, stripped_header);
|
||||
|
||||
Reference in New Issue
Block a user