sending_email
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sending_email [2020/04/20 17:43] – juckins | sending_email [2020/11/12 10:30] (current) – juckins | ||
---|---|---|---|
Line 4: | Line 4: | ||
# | # | ||
- | $sysadmin = "juckins\@gmail.com"; | + | $sysadmin = "user\@domain.com"; |
$script_name = " | $script_name = " | ||
- | $archive_data_dir = "/var/www/html/ | + | $archive_data_dir = "/a/b/c"; |
$latest_file_download = `ls -1 $archive_data_dir| tail -n 1`; | $latest_file_download = `ls -1 $archive_data_dir| tail -n 1`; | ||
Line 15: | Line 15: | ||
$now = `date`; | $now = `date`; | ||
chomp($now); | chomp($now); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | my $email_message_file = " | ||
+ | my $now = &now(); | ||
+ | open (EMAIL, "> | ||
+ | print EMAIL " | ||
+ | print EMAIL " | ||
+ | close (EMAIL); | ||
+ | send_reminder(" | ||
+ | |||
+ | #--- | ||
+ | # send reminder if error encountered | ||
+ | # email recipient, email subject, and filename for email body will be passed in | ||
+ | #--- | ||
+ | sub send_reminder { | ||
+ | my ($recipient, | ||
+ | print LOG " | ||
+ | my $reminder_results = ""; | ||
+ | $reminder_results = system(" | ||
+ | print LOG " | ||
} | } | ||
</ | </ |
sending_email.txt · Last modified: 2020/11/12 10:30 by juckins