473,606 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3621
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
1817
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 NEW so I don't have to retrieve them all. If you have experience with this kind of thing, you know that the server creates unique IDs for all the messages, but this IDs are not guaranteed to be unique, since they can be reused once a message is...
6
2192
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 connect to the server and see the number of messages on the server, but message details (sender, subject, body, etc.) are not returned. _______________ Dim Mailer
0
1819
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 services? -- John Dalberg
0
981
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 name should I pass? I do not know much about in our network but I am sending one of the server name in our environment which I can reach active directory. Thanks, Jim.
4
1952
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 extremely slow (as my mail box is very very large, around 10000 mails need to process per day) Any suggestions?
4
1685
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 mail server account to test the code. Now, I need to write the functionality of the mail server end. My goal is to receive emails from a few accounts, look at the to addresses and forward it to different mailboxes. And, different users should be...
3
2719
by: sonu | last post by:
how can i read all the mail on smtp mail server amit
1
11297
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 class using that i can directly get the full info ablt the mail, like TO,From,Subject,Body,Attachments, Below is the code which i develop, using System;
1
5680
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 mail, like as TO,From,Subject,Body. here I am attaching my coe which i developed. using System; using System.Collections.Generic; using System.Text;
0
8024
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
7959
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8105
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6781
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3942
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2451
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1305
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.