I am using Status Filter Rules to send warning and error messages via email from several CM07 sites. The process hasn't been consistent.
Messages created by the SMS_Distribution_Manager do not send the entire description field where other components do. I have not been able to figure it out.
I have tried using vbscript and powershell, both give the same results.
Here is what I am doing for distribution manager emails via vbscript.
cscript.exe "C:\Scripts\sendMail.vbs" "myemailaaddress" "%msgdesc"
SendMail.vbs contents:
Const SMTPServer = "IP Address of SMTP Server" ' SMTP server IP address
Const From = "From Address"
Const Subject = "SCCM Package Alert"
Set objArgs = WScript.Arguments
If objArgs.count < 2 Then
' All arguments are required
WScript.Quit(1)
Else
SendGenericMail objArgs(0), objArgs(1)
End If
Sub SendGenericMail (sTo, sMessage)
On Error Resume Next
' Generate TO and CC recipients based on number of e-mail addresses provided.
If instr(sTo,";") > 1 Then
sTo_array = Split(sTo,";")
kokku = UBound(sTo_array)
For i = 1 to kokku
If i <> kokku Then
CCstring = CCstring & sTo_array(i) & ", "
Else
CCstring = CCstring & sTo_array(i)
End If
Next
TOstring = sTo_array(0)
Else
TOstring = trim(sTo)
End If
Set CDO = WScript.CreateObject("CDO.Message")
CDO.From = From
CDO.To = TOstring
CDO.Cc = CCstring
CDO.Subject = Subject
CDO.TextBody = sMessage
CDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
CDO.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDO.Configuration.Fields.Update
CDO.Send
End Sub
Here is an example of the email body then the full message detail.
Email Body:
SMS Distribution Manager failed to process package Law
Here is the full message detail:
SMS Distribution Manager failed to process package "Law Civil Image" (package ID = DIT007A9).
Possible cause: Distribution manager does not have access to either the package source directory or the distribution point.
Solution: Verify that distribution manager can access the package source directory/distribution point.
Possible cause: The package source directory contains files with long file names and the total length of the path exceeds the maximum length supported by the operating system.
Solution: Reduce the number of folders defined for the package, shorten the filename, or consider bundling the files using a compression utility.
Possible cause: There is not enough disk space available on the site server computer or the distribution point.
Solution: Verify that there is enough free disk space available on the site server computer and on the distribution point.
Possible cause: The package source directory contains files that might be in use by an active process.
Solution: Close any processes that maybe using files in the source directory. If this failure persists, create an alternate copy of the source directory and update the package source to point to it.
Email messages from other component sources have the complete description field.
Can someone tell me what I am doing wrong or what I might be missing?
Thanks,
Steve
- Moved by Garth JonesMVP Sunday, December 28, 2014 4:54 PM SDK q