Dave Cross wrote:
> I've just seen a downside to the "no non-standard modules" 
> rule, which is that we'll have to send all mail by piping
> to sendmail. And that really hits your cross-platform
> compatibility.

Well, it depends on how much pain you want to inflict on yourself.

socket and connect are part of core Perl, so there's nothing stopping you
opening a socket to a mail server's port 25 and talking SMTP to it. And if
you're slightly less masochistic, I believe Socket is also part of standard
Perl (at least of current Perls), which gives you inet_aton, sockaddr_in,
AF_INET, SOCK_STREAM, and so on -- and for the next level, you have
IO::Socket (also standard as of 5.004, according to `perldoc perlipc`),
which allows you to connect as easily as IO::Socket::INET->new(Proto=>'tcp',
PeerAddr=>'mailhost', PeerPort=>'smtp(25)').

It *is* possible to send mail (at least via SMTP) without needing any
modules from CPAN. Just like it's possible to do CGI form decoding without
CGI.pm. The question is whether this makes sense in general, but it's not
impossible to do without external modules -- you just end up either
re-inventing lots of wheels or copy-and-pasting from the CPAN module in
question :-).

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.

Reply via email to