Consulting

Results 1 to 2 of 2

Thread: Outlook macro to strip emails in folder of read receipt request in header

  1. #1

    Outlook macro to strip emails in folder of read receipt request in header

    Hi all

    I am trying to create a macro to delete any read receipt request in the headers of all emails in a particular Outlook folder.

    I understand from [link - I am not allowed to post the link. Please google for an article on Vamsoft.com title "How to remove read receipt requests on the server?"] that deleting these 2 headers will do the trick:

    Read-Receipt-To:
    Disposition-Notification-To:

    Unlike the situation considered by the cited article, I do not need a way to strip the headers of incoming emails. I just need to do this for all emails in a particular chosen folder.

    I am trying to adapt this code in the cited article for the purpose, but because I do not have coding expertise, I am just grappling in the dark and have had no success:

    Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
        ' remove read receipt request fields
        Set Flds = Msg.Fields
        With Flds
          .Delete("urn:schemas:mailheader:Disposition-Notification-To")
          .Delete("urn:schemas:mailheader:Read-Receipt-To")
          ' update the mail header
          .Update
        End With
    
        ' save changes to the mail
        Msg.Datasource.Save
    
        ' continue execution with the next sink
        EventStatus = cdoRunNextSink
      End Sub
    I would be so very grateful if someone can lend a hand.

    Thanks!

    Best,
    Jay

  2. #2
    Anyone please?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •