Skip to content

Commit 6f28370

Browse files
committed
win32/sendmail.c: remove mailRPath parameter that is always NULL
1 parent 4dad723 commit 6f28370

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ext/standard/mail.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ PHPAPI bool php_mail(const char *to, const char *subject, const char *message, c
543543
char *tsm_errmsg = NULL;
544544

545545
/* handle old style win smtp sending */
546-
if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, hdr, subject, to, message, NULL, NULL, NULL) == FAILURE) {
546+
if (TSendMail(INI_STR("SMTP"), &tsm_err, &tsm_errmsg, hdr, subject, to, message, NULL, NULL) == FAILURE) {
547547
if (tsm_errmsg) {
548548
php_error_docref(NULL, E_WARNING, "%s", tsm_errmsg);
549549
efree(tsm_errmsg);

win32/sendmail.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static zend_string *php_win32_mail_trim_header(const char *header)
186186
//*********************************************************************
187187
PHPAPI int TSendMail(const char *host, int *error, char **error_message,
188188
const char *headers, const char *Subject, const char *mailTo, const char *data,
189-
char *mailCc, char *mailBcc, char *mailRPath)
189+
char *mailCc, char *mailBcc)
190190
{
191191
int ret;
192192
char *RPath = NULL;
@@ -216,9 +216,7 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
216216
}
217217

218218
/* Fall back to sendmail_from php.ini setting */
219-
if (mailRPath && *mailRPath) {
220-
RPath = estrdup(mailRPath);
221-
} else if (INI_STR("sendmail_from")) {
219+
if (INI_STR("sendmail_from")) {
222220
RPath = estrdup(INI_STR("sendmail_from"));
223221
} else if (headers_lc) {
224222
int found = 0;

win32/sendmail.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
PHPAPI int TSendMail(const char *host, int *error, char **error_message,
3636
const char *headers, const char *Subject, const char *mailTo, const char *data,
37-
char *mailCc, char *mailBcc, char *mailRPath);
37+
char *mailCc, char *mailBcc);
3838
PHPAPI void TSMClose(void);
3939
PHPAPI const char *GetSMErrorText(int index);
4040
#endif /* sendmail_h */

0 commit comments

Comments
 (0)