At 06:33 PM 3/17/00 +0100, Riccardo 'Rojelio' Brigo wrote:
>    I experienced a problem using Perl's sockets for a SMTP transaction: it
>seems that every string I send to the socket is appended to last message
>received by the server.
>    For example, I receive the usual "220-Sendmail....." message, I send my
>"HELO hostname" command and what is really sent is "220-Sendmail......HELO
>hostname".
>    I read that this problems derives by the fact that Perl considers sockets
>just as files, which is true under Unix but not under VMS. Given this, 
>still I don't know how to solve it. Is there a simple way to empty the 
>outgoing-buffer before sending my messages?

Basically don't use stdio for sockets, which means no <> or print. Instead 
use sysread and syswrite instead.

For mail stuff you're probably best off using Net::SMTP anyway, as it 
already takes care of the nasty stuff and understands the extended SMPT 
stuff and all.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to