in reply to trouble sending mail

ok I got it to work now with:
#!/usr/local/bin/perl use strict; use Win32::OLE::Const; my %olConst = %{ Win32::OLE::Const->Load( "Microsoft Outlook" ) }; # Send report by mail my $outlook = new Win32::OLE('Outlook.Application'); my $mailitem = $outlook->CreateItem($olConst{olMailItem}) or die "coul +d not create item."; $mailitem->{To} = "spam@spam.com"; $mailitem->{Subject} = "Copy report"; $mailitem->{Body} .= "abc"; $mailitem->Send();
Thanks

Replies are listed 'Best First'.
Re: Re: trouble sending mail
by dws (Chancellor) on Mar 23, 2001 at 04:06 UTC
    The risk of actively exposing your email address in a script is that you're now liable to start receiving "Copy report" emails from all over the world as people try out your script. :)

    You might counter by keeping a list of senders on your homenode.