Novell is now a part of Micro Focus

I want to write a small Perl script...

Articles and Tips: qna

01 Jan 2003


Q.

I want to write a small Perl script that lets me know if a Volume is 80% full. Can I get this message via email? We have a lot of servers, and I want to be informed if a volume fills up very quickly.

A.

Try putting this in your script:

use Mail::Sendmail;
.
.
.
$to = 'norbert.gerner@?bhf-bank.com';
$from = 'Volumechecker@?bhf-bank.com';
	
# Mailinformationen
%mail = ( To      => "$to",
          From    => "$from",
		  Subject => "Hallo Nobert",
		  Message => "Hallo Volume"
		);
	
# Mail absenden
sendmail(%mail) or die
   $Mail::Sendmail::error;

Don't forget to change the $default_smtp_server = 'mh.novell.com'; in the sys:\perl\lib\mail\sendmail.pm file. Replace it with your SMTP-Host.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates