Class DailyReportEmailer


  • public class DailyReportEmailer
    extends Object

    The email reporter creates and sends emails to an administrator. This only reports information for today's date. It is expected this will be used just after the checksum checker has been run.

    Author:
    Jim Downing, Grace Carpenter, Nathan Sarr
    • Constructor Detail

      • DailyReportEmailer

        public DailyReportEmailer()
        Default constructor.
    • Method Detail

      • sendReport

        public void sendReport​(File attachment,
                               int numberOfBitstreams)
                        throws IOException,
                               javax.mail.MessagingException
        Send the report through email.
        Parameters:
        attachment - the file containing the report
        numberOfBitstreams - the number of bitstreams reported
        Throws:
        IOException - if IO exception occurs
        javax.mail.MessagingException - if message cannot be sent.
      • main

        public static void main​(String[] args)
        Allows users to have email sent to them. The default is to send all reports in one email
        -h
        help
        -d
        Select deleted bitstreams
        -m
        Bitstreams missing from assetstore
        -c
        Bitstreams whose checksums were changed
        -n
        Bitstreams whose checksums were changed
        -a
        Send all reports in one email
        Parameters:
        args - the command line arguments given