Commit 6f28370d2fd for php.net
commit 6f28370d2fdf9f4e20e22a2efc61059b2e66d1db
Author: Gina Peter Banyard <girgias@php.net>
Date: Wed Dec 24 18:35:15 2025 +0100
win32/sendmail.c: remove mailRPath parameter that is always NULL
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index b631d12e4c7..e1d514f9e0b 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -543,7 +543,7 @@ PHPAPI bool php_mail(const char *to, const char *subject, const char *message, c
char *tsm_errmsg = NULL;
/* handle old style win smtp sending */
- if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, hdr, subject, to, message, NULL, NULL, NULL) == FAILURE) {
+ if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, hdr, subject, to, message, NULL, NULL) == FAILURE) {
if (tsm_errmsg) {
php_error_docref(NULL, E_WARNING, "%s", tsm_errmsg);
efree(tsm_errmsg);
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 719175bf74b..f336cabae77 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -186,7 +186,7 @@ static zend_string *php_win32_mail_trim_header(const char *header)
//*********************************************************************
PHPAPI int TSendMail(const char *host, int *error, char **error_message,
const char *headers, const char *Subject, const char *mailTo, const char *data,
- char *mailCc, char *mailBcc, char *mailRPath)
+ char *mailCc, char *mailBcc)
{
int ret;
char *RPath = NULL;
@@ -216,9 +216,7 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
}
/* Fall back to sendmail_from php.ini setting */
- if (mailRPath && *mailRPath) {
- RPath = estrdup(mailRPath);
- } else if (INI_STR("sendmail_from")) {
+ if (INI_STR("sendmail_from")) {
RPath = estrdup(INI_STR("sendmail_from"));
} else if (headers_lc) {
int found = 0;
diff --git a/win32/sendmail.h b/win32/sendmail.h
index 6cfdc5706f1..cf38d1dc281 100644
--- a/win32/sendmail.h
+++ b/win32/sendmail.h
@@ -34,7 +34,7 @@
PHPAPI int TSendMail(const char *host, int *error, char **error_message,
const char *headers, const char *Subject, const char *mailTo, const char *data,
- char *mailCc, char *mailBcc, char *mailRPath);
+ char *mailCc, char *mailBcc);
PHPAPI void TSMClose(void);
PHPAPI const char *GetSMErrorText(int index);
#endif /* sendmail_h */