Open steve-work opened 5 years ago
Well, to me it sounds like you're using the wrong config for the wrong version. Configs described on the blog are for PSWinReporting. PSWinWreportingV2 has different config - https://github.com/EvotecIT/PSWinReporting/blob/master/Examples/RunMe-TriggerOnEvents.ps1 and it's not really described how it works yet. It's much more advanced on what you can do, but you need to be aware of how things work.
Thanks for the quick reply. I'm using the file: https://github.com/EvotecIT/PSWinReporting/blob/master/Examples/RunMe-TriggerOnEvents.ps1
Here is what I've got on lines 55-93:
Default = @{
Parameters = @{
From = 'adchanges@XXXX.com'
To = 'steve-work@XXXX.com'
CC = ''
BCC = ''
ReplyTo = ''
Server = "smtp.XXXX.local"
Password = ''
PasswordAsSecure = $false
PasswordFromFile = $false
Port = '25'
Login = ''
EnableSSL = 0
Encoding = 'Unicode'
Subject = 'Event Changes for period <<DateFrom>> to <<DateTo>>'
Priority = 'Low'
}
}
High = @{
Parameters = @{
From = 'adchanges@XXXX.com'
To = 'steve-work@XXXX.com'
CC = ''
BCC = ''
ReplyTo = ''
Server = "smtp.XXXX.local"
Password = ''
PasswordAsSecure = $false
PasswordFromFile = $false
Port = '25'
Login = ''
EnableSSL = 0
Encoding = 'Unicode'
Subject = 'Event Changes for period <<DateFrom>> to <<DateTo>>'
Priority = 'High'
}
}
}
Oh, I see. Well, I'll try to ding the root cause. I've not tested this new version lately so I'll give it a go. I'll be in touch
Turns out I've actually never tested emails in PSWinReportingV2 for TriggerOnEvents. I've now fixed that but I want to rewrite some portions of it to use Emailimo I think.
This was autoclosed by github. It seems commit with "fixes" closes issues.
I'm using version 2.0.11, and have set up event forwarding. Events are coming through and I've set up the task to trigger RunMe-TriggerOnEvents.ps1. I've configured my email settings in RunMe-TriggerOnEvents.ps1: From = 'ADChanges@XXXX.com' To = 'steve-work@XXXX.com' CC = '' BCC = '' ReplyTo = '' Server = "smtp.XXXX.local" Password = '' PasswordAsSecure = $false PasswordFromFile = $false Port = '25' Login = '' EnableSSL = 1 Encoding = 'Unicode' Subject = 'Event Changes for period <> to <>'
Priority = 'Low'
smtp.XXXX.local is a working internal SMTP relay, which does not require authentication.
When the script gets triggered, nothing happens. I've tried manually running it with the same parameters and get the following errors:
I have also tried connecting to office 365 with a login name and password, but get the same error.