How to move emails from unknown senders to a specific folder in Outlook?
In your daily work, you may receive many emails come from unknown senders which are not saved in your Contacts folder. These may be some junk or malicious emails, in this case, you want to auto move these emails to a specific folder instead of the Inbox. How could you solve this job in Outlook?
Actually, you can create a rule to move the emails from unknown senders to a specific folder automatically, please do as follows:
1. Create a new folder under the Inbox folder which will place the emails come from unknow senders as following screenshot shown:
2. Then click Home > Rules > Manage Rules & Alerts, see screenshot:
3. In the Rules and Alerts dialog box, click New Rule under the E-mail Rules tab, see screenshot:
4. And click OK button to go to the Rule Wizard, click Apply rule on message I receive option from the Start from a blank rule section box, see screenshot:
5. Then click Next button, in this step, please don’t select any option, and click Next button directly, a warning box is popped out, please click Yes button, see screenshot:
6. And in the next dialog box, check move it to the specified folder option in the Step1: Select action(s) list box, and then click the linked text specified, and in the opened Rules and Alerts dialog, specify the folder where you want to move the emails to, see screenshot:
7. Click OK button, and go on clicking Next button, in this Are there any exceptions dialog, check except if sender is in specified Address Book option in the Step1: Select exception(s) list box, and then click the linked text specified, and an Add Address List box will pop out, select a contacts folder which contains the contacts you want to except, see screenshot:
8. Then click Add button, and then click Next to go to the last wizard dialog, type a rule name in the Step1: Specify a name for this rule text box, and check Turn on this rule option from the Step2: Setup rule options section. See screenshot:
9. And then click Finish and Ok buttons to close the dialogs. From now on, when emails coming from unknown senders, they will be moved to the specific folder automatically.
May be the above method is troublesome for you, here, you can apply a code to deal with it as quickly as you can.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, double click ThisOutlookSession from the Project1(VbaProject.OTM) pane to open the mode, and then copy and paste the following code into the blank module.
VBA code: Auto move emails from unknown senders to a specific folder:
Public WithEvents MailItems As Outlook.Items Private Sub Application_Startup() Set MailItems = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub MailItems_ItemAdd(ByVal item As Object) Dim xSenderEmailAddress As String Dim xContactItems As Outlook.Items Dim xContactItem As ContactItem Dim I As Long Dim xFilter As String Dim xTargetFolder As Folder Dim xContactFolder As Folder Dim xStore As Store Dim xInboxFlds As Folders Dim xSubFolder As Folder Dim xFound As Boolean On Error Resume Next If item.Class = olMail Then xSenderEmailAddress = item.SenderEmailAddress End If For Each xStore In Outlook.Application.Session.Stores Set xContactItems = xStore.GetDefaultFolder(olFolderContacts).Items For I = 3 To 1 Step -1 xFilter = "[Email" & I & "Address] = " & xSenderEmailAddress Set xContactItem = xContactItems.Find(xFilter) If TypeName(xContactItem) <> "Nothing" Then Exit For Next Next If xContactItem Is Nothing Then Set xInboxFlds = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Folders xFound = False For Each xSubFolder In xInboxFlds If xSubFolder.Name = "Unknown" Then xFound = True Set xTargetFolder = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Folders("Unknown") Exit For End If Next If xFound = False Then Set xTargetFolder = Outlook.Application.Session.GetDefaultFolder(olFolderInbox).Folders.Add("Unknown") End If item.Move xTargetFolder End If End Sub
3. Then save the code and close the code window, and restart the Outlook to make the code take effect. From now on, when the emails coming from some unknown senders, they will be moved to the Unknown folder automatically, see screenshot:
Note: The Unknown folder will be created automatically when there are some unknown emails incoming. You can change the folder name “Unknow” to others in script.
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.