>>>>> "Steve" == Steve Thompson <[EMAIL PROTECTED]> writes:

> At present i have a system running on a windows 98 machine on personal web 
> server which logs bugs with my software development teams project.

> I would be extremely keen to extend the functionality of this system to 
> automatically e-mail the person (or persons) to whom a task is assigned. I 
> am aware of how to accomplish this under a unix machine but have no idea how 
> to do this on a windows machine.

> Are there any Perl modules which can accomodate this? has anyone here 
> accomplished anything similiar before?

I do this (it is for a specific distribution so it is not as generic
as it could be):

use Net::SMTP;

# ...

sub mail_notice
{
   my $smtp = Net::SMTP->new('your_mail_server);
   die "$0: mail_notice(): Could not open connection to mail relay: $!\n"
       if (! defined $smtp);

   my (@to) = ('khamsi', 'others');
   my $from = $ENV{USERNAME};
   $smtp->mail($from);
   $smtp->to(@to);
   $smtp->data();

   my $subject = "\"some subject\"";
   $smtp->datasend("To: @to\n");
   $smtp->datasend("From: $from\n");
   $smtp->datasend("Subject: $subject\n");
   $smtp->datasend("\n");
   $smtp->datasend("Body of message goes here.\n");
   $smtp->dataend();
   $smtp->quit;
}

Sarir

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to