Need Marco help to identify sender by domain, then perform custom actions

37 Views Asked by At

Certain forums send me email each day. I would like to cull these mails by:

  1. Setting an expiration date (tomorrow/ 24 hours) based on the sender's email domain if the domain criteria is met

  2. Categorizing these emails when identified (Category name is = Review Prior 2 Deletion) to alert me that there is a new email which I need to read before it is moved

  3. After 24 hours, moving each categorized email to the Trash or Delete folder (but not permanently deleting them) as I may want to refer to them after the 24 hours expiration time has passed.

I have found the following code to set the expiration date (below).

Sub SetExpire(Item As Outlook.MailItem)

 If Left(LCase(Item.Subject), 7) = "weather" Then
    Item.ExpiryTime = Now + 1
    Item.Save
End If

End Sub

Any help would be appreciated.

0

There are 0 best solutions below