Satish Kumar wrote:
Hi ScriptKings,
Im a newbie in Perl,
Would like to know following Info:
Can we create
*Perl Scipt to send Mails with Attachments*
Any Tips, Help, Code,Suggestions & Guidance are Welcome
The module Mail::Sender is probaply what you are looking for...
This is a subroutine I use to send a logfile from a Windows-Box.
sub SendMail { # What mail error or okay? my ( $Action ); ( $Action ) = @_; if ( $Action eq "ERROR" ) { $note = "ALERT: blablabla"; } elsif ( $Action eq "OKAY" ) { $note = "NOTE: blablabla"; } $Msg = "See attached file for more details.\n"; if ( $Sender = Mail::Sender->new( {smtp => 'scmail', from => 'serv-int'} ) ) { } else { End ( "FAILED" ); } if ( $Sender->MailFile( { to => 'apprich', subject => "$note", msg => "$Msg", file => "$LogFile"} ) ) { } }
Regards,
Satish
HTH
Alex _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs