[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 636
  • Last Modified:

Import Exchange Mailbox into SQL

I would like to automatically check an Exchange mailbox and import the messages into a SQL 2000 Database.

What is the best way to do this? T-SQL? DTS?

If you have an example of a script to do this, that be excellent.

Thank you,
0
Carmelo_Iorianni_NWCCAC
Asked:
Carmelo_Iorianni_NWCCAC
  • 2
  • 2
1 Solution
 
ralmadaCommented:
Hello Carmelo_Iorianni_NWCCAC,

You can do so by created a linked server to exchange as indicated below:

http://msdn.microsoft.com/en-us/library/aa213275.aspx

Then you could schedule a job in SQL Agent to check your email on a regular basis by creating a step (type: Transact T-SQL) that runs your code indicated in the link above. More info on how to setup a job:

http://www.quackit.com/sql_server/tutorial/sql_server_agent_jobs.cfm

Another possibility is to use SQL Mail and schedule a job again

http://www.sqljunkies.ddj.com/Article/0A1F961B-8E50-4E76-8FCE-31A0F800FCC7.scuk
http://msdn.microsoft.com/en-us/library/aa155737(office.10).aspx




Regards,

ralmada
0
 
Carmelo_Iorianni_NWCCACAuthor Commented:
Thank you,

When using xp_readmail, is there any way to retrive the accual address in CC field? Currently when I import the CC it just shows the firendly name (example for jon.doe@somewhere.com, it just shows doe, jon)

Thank you
0
 
ralmadaCommented:
Hmm, I don't think you can do so.
Have you tried using the linked server?
 
0
 
Carmelo_Iorianni_NWCCACAuthor Commented:
Thank you,  
From the links you provided, I was able to use xp_readmail to check a mailbox and import the messages into a MS SQL DB.
0

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

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