@@ -111,7 +111,7 @@ static const char *ErrorMessages[] =
111111#define PHP_WIN32_MAIL_DOT_PATTERN "\n."
112112#define PHP_WIN32_MAIL_DOT_REPLACE "\n.."
113113
114- static int SendText (char * RPath , const char * Subject , const char * mailTo , char * mailCc , char * mailBcc , const char * data ,
114+ static int SendText (char * RPath , const char * Subject , const char * mailTo , char * mailCc , const char * data ,
115115 const char * headers , char * headers_lc , char * * error_message );
116116static int MailConnect ();
117117static int PostHeader (char * RPath , const char * Subject , const char * mailTo , char * xheaders );
@@ -186,7 +186,7 @@ static zend_string *php_win32_mail_trim_header(const char *header)
186186//*********************************************************************
187187PHPAPI 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 )
189+ char * mailCc )
190190{
191191 int ret ;
192192 char * RPath = NULL ;
@@ -279,7 +279,7 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
279279 PW32G (mail_host ), !INI_INT ("smtp_port" ) ? 25 : INI_INT ("smtp_port" ));
280280 return FAILURE ;
281281 } else {
282- ret = SendText (RPath , Subject , mailTo , mailCc , mailBcc , data , headers ? ZSTR_VAL (headers_trim ) : NULL , headers ? ZSTR_VAL (headers_lc ) : NULL , error_message );
282+ ret = SendText (RPath , Subject , mailTo , mailCc , data , headers ? ZSTR_VAL (headers_trim ) : NULL , headers ? ZSTR_VAL (headers_lc ) : NULL , error_message );
283283 TSMClose ();
284284 if (RPath ) {
285285 efree (RPath );
@@ -387,7 +387,7 @@ static char *find_address(char *list, char **state)
387387// Author/Date: jcar 20/9/96
388388// History:
389389//*********************************************************************
390- static int SendText (char * RPath , const char * Subject , const char * mailTo , char * mailCc , char * mailBcc , const char * data ,
390+ static int SendText (char * RPath , const char * Subject , const char * mailTo , char * mailCc , const char * data ,
391391 const char * headers , char * headers_lc , char * * error_message )
392392{
393393 int res ;
@@ -529,28 +529,7 @@ static int SendText(char *RPath, const char *Subject, const char *mailTo, char *
529529 /* Send mail to all Bcc rcpt's
530530 This is basically a rip of the Cc code above.
531531 Just don't forget to remove the Bcc: from the header afterwards. */
532- if (mailBcc && * mailBcc ) {
533- tempMailTo = estrdup (mailBcc );
534- /* Send mail to all rcpt's */
535- token = find_address (tempMailTo , & token_state );
536- while (token != NULL )
537- {
538- SMTP_SKIP_SPACE (token );
539- FormatEmailAddress (PW32G (mail_buffer ), token , "RCPT TO:<%s>\r\n" );
540- if (!Post (PW32G (mail_buffer ))) {
541- efree (tempMailTo );
542- return (FAILED_TO_SEND );
543- }
544- if ((res = Ack (& server_response )) != SUCCESS ) {
545- SMTP_ERROR_RESPONSE (server_response );
546- efree (tempMailTo );
547- return (res );
548- }
549- token = find_address (NULL , & token_state );
550- }
551- efree (tempMailTo );
552- }
553- else if (headers ) {
532+ if (headers ) {
554533 if ((pos1 = strstr (headers_lc , "bcc:" )) && (pos1 == headers_lc || * (pos1 - 1 ) == '\n' )) {
555534 /* Real offset is memaddress from the original headers + difference of
556535 * string found in the lowercase headers + 4 characters to jump over
0 commit comments