We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Import Exchange Mailbox into SQL

Medium Priority
664 Views
Last Modified: 2012-05-06
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,
Comment
Watch Question

Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
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

Commented:
Hmm, I don't think you can do so.
Have you tried using the linked server?
 
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.