473,378 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

SQL Server -- how do I retrieve mail?

Le

So here's my dilemma. I need an automated SQL Server (2000) job that
runs once once per hour.

This jobs should:

1) Retrieve unread email for the user "Le" from our Exchange Server,
and insert it into a table.

2) Retrieve unread email for the user "Smith", from from our Exchange
Server, and insert it into a table.

3) Retrieve unread email for the user "Carrie", from from our Exchange
Server, and insert it into a table.

My initial thought is to create a DTS package to handle email
retrieval, and insert it into the table in the same step.

But I have no idea how to get started. How do I get DTS/SqlServer to
read mail for these three users?

`Le

Aug 17 '05 #1
3 3613
If you're already using SQL Mail, then you could look at xp_readmail,
but it generally connects to a single mailbox which has been set up for
the MSSQL service account. You might be able to configure Exchange to
copy all emails to Smith etc to that mailbox, but I don't know much
about Exchange. See this KB article and the linked articles for more
information:

http://support.microsoft.com/default...b;en-us;311231

As an alternative, you could write an external script in C#, Perl or
some other language, and call it from a scheduled task or a DTS
package. One final option would be to use a linked server to query
Exchange directly from MSSQL:

http://msdn.microsoft.com/library/de...qd_12_0t5x.asp

Simon

Aug 17 '05 #2
Le
I haev looked into xp_readmail, and it works well, except that it
retrieves mail for SQLAGENT.

I have considered forwarding emails from those 3 users to SQLAGENT,
then parsing through those emails, but that is something I generally
would like to avoid if possible, since we use SQLAGENT for alot of
other things.

`Le

Aug 17 '05 #3
It's probably a general Exchange issue - how can one user (or client)
with one mailbox retrieve mail for several other users? Either the
client process has the security credentials of all the other users in
order to access their mailboxes directly, the other users somehow
delegate access to their mailboxes, or you copy mails to one single
mailbox. But you might get a better answer posting in an Exchange group
- there may already be a well-known solution for this situation.

Simon

Aug 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Madestro | last post by:
Hi guys, I am making a small program to retrieve e-mails from POP accounts. I got all the e-mail parsing stuff figured out, but I cannot seem to come up with a way to find out which e-mails are...
6
by: Rich_C | last post by:
Can anyone tell me why this code doesn't work? The original came from an example in this group, but was modified slightly when the original failed to return message details. I am able to...
0
by: John Dalberg | last post by:
Mail component to retrieve mail from Hotmail, Yahoo, gmail..etc? I am not sure these web based mail support POP3 or IMAP4. Is there any mail component out there that can retrieve mail from these...
0
by: JIM.H. | last post by:
Hello, I have this code to retrieve Active Directory information, When I click button1 I get an exception at oResults = oSearcher.FindAll saying “the server is not operational”. Which server...
4
by: Norton | last post by:
Hi all, I would like to retrieve mail from a mail server (Exchange Server 5.5), do some operations and then delete email. I have try using Outlook to retrieve mail items, it works but...
4
by: sujatasingh_orlando | last post by:
Hello, I have to implement a mail server type program for a project using python. I have already implemented smtp and pop3 protocol to send and retrieve mail at the client side. I used an existing...
3
by: sonu | last post by:
how can i read all the mail on smtp mail server amit
1
by: Prasanta | last post by:
Hello, Please cnay one can tell me how to read mail as formatted.... i have made some code using that able to read but not able to serialize..... so am i need to parse the HTML, or is there any...
1
by: Prasanta | last post by:
Hello, How to read a mail from the mail server as formatted. I am able to read the mail as row HTML, is there any class, or something method using that i can easily get the all info of that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.