• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3633
  • Last Modified:

Script to add entry to "Safe Senders" list in Outlook 2003

I would like to write a command line script to add an entry to the Safe Senders list in Outlook.  We have many users who are getting emails from SharePoint and periodically, Outlook dumps them to the junk mail folder.

Thank you in advance
1 Solution
Paste the script below into a text file with a .cmd extension.  Customize the value of the list variable on line 4 with the location of a text file containing the addresses to allow, one per line.  Ensure that users have Read permission to this directory.

Running the script will add registry entries so that the addresses in the file will be added to the user's Safe Senders list the next time that Outlook is opened.

@echo off
set list=\\server\share\safesenders.txt
set officev=11.0
set key=HKCU\Software\Microsoft\Office\%officev%\Outlook\Options\Mail
reg add "%key%" /v JunkMailImportLists /t REG_DWORD /d 1 /f
reg add "%key%" /v JunkMailSafeSendersFile /t REG_SZ /d "%list%" /f

Open in new window

NBSO_ISSAuthor Commented:
Fantastic!  This will save me alot of time.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now