RE: [PHP-WIN] RE: How to send an email using php in windows 2000

From: Date: Sat, 07 Oct 2000 13:09:49 +0000
Subject: RE: [PHP-WIN] RE: How to send an email using php in windows 2000
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-3042@lists.php.net to get a copy of this message
Well maybe my example "...to send mail from the command line..." was a bit unfortunate, and I didn't explain myself properly. What I meant to say was "the ability of the system to send mail from its internal mailer built in functions", and this should correct my statement. The mail() function in php specificaly says: ---- mail() mail -- send mail Description bool mail(string to, string subject, string message, string [additional_headers]); Mail() automatically mails the message specified in message to the receiver specified in to. Multiple recipients can be specified by putting a comma between each address in to. --- Now you say "use a socket to connect to the mail server". My question now is: if the mail() function only takes the above parameters, how are you supposed to add the username/password challenge to the negotiation? I don't believe there is syntax in the "additional headers" to allow you to do that. Some other method (ie using socket functions) must be used, and I can confirm that it worked for me using a modified version of the library I explained earlier... Regards, Joao -----Original Message----- From: Phil Driscoll [mailto:phil@dialsolutions.co.uk] Sent: 07 October 2000 13:14 To: Joao Duraes; Jorge Nishikuni Cc: Php-Windows Subject: Re: [PHP-WIN] RE: How to send an email using php in windows 2000 >What you've been trying to do in Windows, is to use PHP's sendmail functions >which unfortunately won't work. Windows will not allow you to use the mail >functions, because these depend on the system's ability to send mail from >the command line (like Unix's sendmail). > >What you actually need to do is to connect directly to the SMTP server using >sockets, perform the username/password negotiation and then send the e-mail. Maybe I'm missing something here, but I think that php's mail function under windows does exactly that - ie use a socket to talk to the mail server. It does not use a command line type method of mailing. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org

« previous php.windows (#3042) next »