I am trying to use this code for a Helpdesk Metrics report. The report needs to include the Undeliverable notifications, but your code throws a “Type Mismatch” error when it encounters one.
I tried skipping the “msg = itm” step, but itm does not contain SenderName or To as valid properties.
Any ideas?