Email Logs for OPRA requests [message #148315] |
Thu, 18 June 2020 13:34  |
SHeriff055
Messages: 4 Registered: June 2020
|
|
|
|
There needs to be a way to generate email logs when OPRA requests are made requiring a specific users emails during a specified time frame showing: From, To, Date Subject and other requested information already stored in the Archiver Database. The search capability is already there but there is no way to generate and print a custom report with just the log information.
I can't be the only person who is needing this!
|
|
|
|
|
|
Re: Email Logs for OPRA requests [message #148338 is a reply to message #148321] |
Tue, 23 June 2020 10:43  |
ian.bugeja
Messages: 666 Registered: March 2017 Location: Malta
|
|
|
|
Hi
The easiest way you can achieve this I think is using the following SQL query
SELECT ar.[id]
,ar.[date]
,ar.[receivedDate]
,ar.[full_subject]
,(
SELECT ad.[email]
FROM [dbo].[arc_add] ad
WHERE [type] = 0 AND (ad.id = ar.id)
) as sender
,Stuff((
SELECT '; ' + ad1.[email]
FROM [dbo].[arc_add] ad1
WHERE [type] > 0 AND (ad1.id = ar.id) FOR XML PATH('')
), 1, 1, '') as ToCC
FROM [dbo].[arc] ar
Ian Bugeja
GFI Software
|
|
|