TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:emailing_reports

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cli:emailing_reports [2017/07/27 18:02] – created Gerard Nicolcli:emailing_reports [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 5: Line 5:
 This can be achieved using the following methods: This can be achieved using the following methods:
  
-  - Via a command line SMTP agenet such as blat or mailx.+  - Via a command line SMTP agent such as [[https://sourceforge.net/projects/blat/ |blat]] or mailx.
   - Via the Send Email action of Windows Scheduler.   - Via the Send Email action of Windows Scheduler.
   - Via the TapeTrack SMTP PowerShell script.   - Via the TapeTrack SMTP PowerShell script.
Line 11: Line 11:
 ===== 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, open Windows PowerShell as the Windows Administrator.
 + 
 +{{:cli:powershell_admin.png}}
 +
 +Run the command ''Set-ExecutionPolicy RemoteSigned''
 +
 +{{:cli:powershell_security.png}}
 +
 +==== Command Line Arguments ====
 +
 +The PowerShell script takes the following arguments:
 +
 +  * ''config'' The path to the configuration file.
 +  * ''smtpserver''  The IP address or name of the SMTP Server.
 +  * ''smtpport''  SMTP Server port.
 +  * ''smtpuser'' User-id of the user used to authenticate on the SMTP Server.
 +  * ''smtppw'' Password of the user used to authenticate on the SMTP Server.
 +  * ''smtpssl'' This enables SSL encryption for the email if required by the SMTP Server.
 +
 +
 +<code>
 +Powershell.exe -File TMSSSMTP.ps1 -smtpuser tapetrack@gazillabyte.com -smtppw mypassword -smtpssl
 +</code>
 +
 +==== Configuration File ====
 +
 +The Configuration File instructs the script what to send, who to send it to, and who to send it from.
 +
 +The file consists of records that contain a control character, followed by an argument. The control character must be in the first byte 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.
 +
 +<code>
 +Fsomebody@gazillabyte.com
 +Tsomebody@gazillabyte.com
 +Csomebodyelse@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
 +</code>
 +
 +===== Examples =====
 +
 +==== Email Scratch Report ====
 +
 +<code>
 +TMSS10Inventory -S batch:-batch@gazillabyte.tapetrack.com -V "*.*.*@*+Z" > report.txt
 +PowerShell -config scratch.cfg -server smtp.tapetrack.com -port 25
 +</code>
cli/emailing_reports.1501178521.txt.gz · Last modified: 2025/01/21 22:07 (external edit)