TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:emailing_reports

This is an old revision of the document!


Emailing Reports

When producing reports via the TapeTrack Command Line Interface programs, you may wish to send these reports via an email attachment.

This can be achieved using the following methods:

  1. Via a command line SMTP agenet such as blat or mailx.
  2. Via the Send Email action of Windows Scheduler.
  3. Via the TapeTrack SMTP PowerShell script.

The TapeTrack SMTP PowerShell Script

The TapeTrack SMTP PowerShell Script allows files to be sent to one or more users via SMTP. The script is installed as part of the TapeTrack Server Utilities Package.

Enabling Signed Scripts

The TapeTrack SMTP PowerShell Script is digitally signed with GazillaByte's code signing certificate, but by default Windows disallows the invocation of all PowerShell scripts.

To enabled signed scripts:

  1. Open Windows PowerShell as the Windows Administrator.
  2. Run the command Set-ExecutionPolicy RemoteSigned

Command Line Arguments

The PowerShell script takes the following arguments:

  1. config this is the path to the configuration file.
  2. smtpserver this is the IP address or name of the SMTP Server.
  3. smtpport this is the port of the SMTP Server.
  4. smtpuser this is the userid of the user used to authenticate on the SMTP Server.
  5. smtppw this is the password of the user used to authenticate on the SMTP Server.
  6. smtpssl This enables SSL encryption for the email if required by the SMTP Server.
Powershell.exe -File TMSSSMTP.ps1 -smtpuser tapetrack@gazillabyte.com -smtppw mypassword -smtpssl

Configuration File

.
. This is a sample email configuration file used by the TMSSSMTP.ps1 Powershell Script.
. Each new record starts with a control character, fillowed by an argument that is used to
. determine how the email is processed. The control character must start on the first character of each record.
.
. F=From (1 only)
. T=To (1 or more)
. C=CC (1 or more)
. S=Subject (1 only)
. B=Body text (1 or more)
. A=path to attachment file (1 or more)
. .=comment.
.
Fsomebody@gazillabyte.com
Tsomebody@gazillabyte.com
Tsomebodyelse@gazillabyte.com
BPlease see attached file.
BTo change who receives this email please edit the email.cfg file used by TMSSEmail.ps1
Ainventory.txt
SInventory Report
cli/emailing_reports.1501179951.txt.gz · Last modified: 2025/01/21 22:07 (external edit)