Dsantibanez
3 Argentum

Send mminfo notificacion on Completion Policy

Jump to solution

Hi everyone ¿it is posible to attach a mminfo resultset with the send Notificaction option avaliable on  NMC?

 

Actually I have this: 

smtpmail -s "Politica ${NSR Policy} and Workflow ${NSR Workflow} y Accion ${NSR Action} completada" -h mailserver-p 25 teamnetworker@local.com.

 

I would like to attach this mminfo result:

 

mminfo -xc; -s nserver2 -q "client=orasvr,family=Disk" -r volume,ssid,savetime,sscreate,sscomp,group,level,sumflags,sumsize,name | findstr cb | findstr full 

 

Thanks in advance

 

 

 

0 Kudos
1 Solution

Accepted Solutions
bingo.1
4 Ruthenium

Re: Send mminfo notificacion on Completion Policy

Jump to solution

It looks as the smtpmail utility that comes with the NW software cannot handle attachments. So let me suggest this procedure

1. save the mminfo output to a file:     mmminfo -q .... -r .... > filename

2. append the mminfo output file to the 'better' mail command. On Windows, I use the Powershell command 'send-mailmessage' where I 

  -  first assign the file content to a string variable      $body = Get-Content $file | out-string

  -  then add the content to the '-body' parameter      send-mailmessage ..... -body $body

Maybe there is even a more elegant way but nobody is perfect 😉

 

View solution in original post

1 Reply
bingo.1
4 Ruthenium

Re: Send mminfo notificacion on Completion Policy

Jump to solution

It looks as the smtpmail utility that comes with the NW software cannot handle attachments. So let me suggest this procedure

1. save the mminfo output to a file:     mmminfo -q .... -r .... > filename

2. append the mminfo output file to the 'better' mail command. On Windows, I use the Powershell command 'send-mailmessage' where I 

  -  first assign the file content to a string variable      $body = Get-Content $file | out-string

  -  then add the content to the '-body' parameter      send-mailmessage ..... -body $body

Maybe there is even a more elegant way but nobody is perfect 😉

 

View solution in original post