Re: Update to mail() function help

From: Date: Mon, 26 May 2003 06:41:55 +0000
Subject: Re: Update to mail() function help
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-2008@lists.php.net to get a copy of this message
Either I'm going crazy, or this list is stripping the MIME attachment now. At any rate, here is the diff: --- mail.c Fri Nov 29 03:15:43 2002 +++ /home/patrick/mail.c Sun May 25 17:08:11 2003 @@ -149,7 +149,8 @@ int ret; char *sendmail_path = INI_STR("sendmail_path"); char *sendmail_cmd = NULL; - + zval **server_name; + if (!sendmail_path) { #if (defined PHP_WIN32 || defined NETWARE) /* handle old style win smtp sending */ @@ -198,6 +199,16 @@ #endif fprintf(sendmail, "To: %s\n", to); fprintf(sendmail, "Subject: %s\n", subject); + + zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "SERVER_NAME", sizeof("SERVER_NAME"), (void **) &server_name); + + convert_to_string_ex(server_name); + + if (strlen(Z_STRVAL_PP(server_name)) > 0) + { + fprintf(sendmail, "X-Site-Origin: %s\n", Z_STRVAL_PP(server_name)); + } + if (headers != NULL) { fprintf(sendmail, "%s\n", headers); } Patrick On 5/25/03 23:38, Patrick Gibson wrote: > That's weird -- the copy in my outbox has the attachment, but it didn't come > through for some reason. Trying again... > > On 5/25/03 23:29, Derick Rethans wrote: > >> On Sun, 25 May 2003, Patrick Gibson wrote: >> >>> <blush> Whoops, that would explain the weirdness when I ran patch. :) Here's >>> a diff using the correct order. >> >> Where? >> >> Derick > > --- > patrick gibson > patrick @ patrickg.com > http://patrickgibson.com/ > >

« previous php.internals (#2008) next »