[Xitami] (no subject)

Neco Computers xitami@lists.xitami.org
Sat, 13 Jul 2002 14:56:35 -0500


> What is that best way to send E-mail through CGI Perl scripts, using
Xitami? Also if you
> can supply some Perl Syntax for doing so. I am use to UNIX, and I'm not
sure how to do
> this on a Windows server.

You can use sockets to send email:

  use Net::SMTP;
   my $smtp = Net::SMTP->new($smtp_server, Debug => 0) || die "unable to
create Net::SMTP object $smtp_server.";
   $smtp->mail($Webmaster);
   $smtp->to($Email);
   $smtp->data();
   $smtp->datasend("From: $Webmaster\n");
   $smtp->datasend("Subject: $subject\n");
   $smtp->datasend("\n");
   $smtp->datasend($message);
   $smtp->dataend();
   $smtp->quit();

You can either hard code the your email address or have it passed in from
the variables like is set up here.

Neil Finlayson
http://neco.pages.d2g.com



>
> Thanks,
>
> Jonathan Hancock
> www.trusHosting.com
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>