473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitor SMTP server

Hey all,

I need to connect to an SMTP server and get a notification when it gets a
new mail to send. I want to be able to 'read' that email (retrieve recipient
information for example).
Is that possible? After much much researching I came across this article on
MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck in
step 2 even (I have some missing files that supposedely are in the download,
but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie
Nov 16 '05 #1
7 3009
> I need to connect to an SMTP server and get a notification when it gets a
new mail to send. I want to be able to 'read' that email (retrieve recipient
information for example).
What *kind* of SMTP-server?
Is that possible? After much much researching I came across this article on
MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck in
step 2 even (I have some missing files that supposedely are in the download,
but they aren't). Anyway, that article won't help me.


Well, the stuff is for the Exchange Server. Do you run it?

bye
Rob
Nov 16 '05 #2
Not sure what SMTP server you are talking about, but this article and
accompanying code is to be used with Windows 2000 SMTP or Exchange server
only.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey all,

I need to connect to an SMTP server and get a notification when it gets a
new mail to send. I want to be able to 'read' that email (retrieve
recipient information for example).
Is that possible? After much much researching I came across this article
on MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck
in step 2 even (I have some missing files that supposedely are in the
download, but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie

Nov 16 '05 #3
Thanks repliers,

It is meant for Exchange yes. I know little about Exchange or the different
kind of SMTP. I figured since every SMTP server uses the same protocol
(smtp:P) it doesn't matter what kind of smtp server.

Anyway to be a little more precise, if a person uses outlook, webmail,
telnet, whatever, to send an email, I want to directly check that email for
certain settings. If only I knew how to connect to an smtp server and get
the emails being sent... I take it I have to use SMPT event sinks, but was
wondering if it has to be so difficult:

- I found 2 articles (one on codeproject, and that msdn article) they all
use com objects, with which I have difficulties deploying it to a server
other than my developing pc
- Both articles didn't work for me (the MSDN one is really missing some
files in its download, the codeproject one didn't want to deploy for me)

Is there any other easy tutorial out there or some code samples?

Thanks,

Razzie

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey all,

I need to connect to an SMTP server and get a notification when it gets a
new mail to send. I want to be able to 'read' that email (retrieve
recipient information for example).
Is that possible? After much much researching I came across this article
on MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck
in step 2 even (I have some missing files that supposedely are in the
download, but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie

Nov 16 '05 #4
If you run Exchange Server 2000 or 2003 you must use the technique described
in the MSDN article, note that you must install/run the code on the server
running Exchange, so if you don't have access to the server running
Exchange, you can forget about eventing.
Note that eventing is a service offered by the smtp service on W2K and W2K3
and Exchange 2000/2003, this is not part of the standard so other servers do
not apply.
Maybe you could start explaining what problem you had and what you mean
with step 2 in the article.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Thanks repliers,

It is meant for Exchange yes. I know little about Exchange or the
different kind of SMTP. I figured since every SMTP server uses the same
protocol (smtp:P) it doesn't matter what kind of smtp server.

Anyway to be a little more precise, if a person uses outlook, webmail,
telnet, whatever, to send an email, I want to directly check that email
for certain settings. If only I knew how to connect to an smtp server and
get the emails being sent... I take it I have to use SMPT event sinks, but
was wondering if it has to be so difficult:

- I found 2 articles (one on codeproject, and that msdn article) they all
use com objects, with which I have difficulties deploying it to a server
other than my developing pc
- Both articles didn't work for me (the MSDN one is really missing some
files in its download, the codeproject one didn't want to deploy for me)

Is there any other easy tutorial out there or some code samples?

Thanks,

Razzie

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey all,

I need to connect to an SMTP server and get a notification when it gets a
new mail to send. I want to be able to 'read' that email (retrieve
recipient information for example).
Is that possible? After much much researching I came across this article
on MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck
in step 2 even (I have some missing files that supposedely are in the
download, but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie


Nov 16 '05 #5
Thanks for the details.

My first problem was I didn't have midl compiler. I downloaded the Platform
SDK for it. When I ran the nmake.exe program in step 2 of the msdn tutorial
again, it still couldn't find it. So, running Program Files\Microsoft Visual
Studio .NET\Common7\To ols\vsvars32.ba t doesn't work, since the path for midl
is not right.
Then I ran the platform SDK command prompt, now it can find midl.
Now I got an error something like cannot open input file 'MailMsg.idl' and
the program (nmake.exe) aborted. It did find another idl file, just not that
one (and god knows what others it need).

It doesn't say in the MSDN that I need to have anything else installed, so
not to flame, but when I install all this, correct 3 things and still get
errors because I miss a certain file, with no pointers in the MSDN why or
where to get it, I get a bit... angry ;)

Any help with this is appreciated :)

Razzie
"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
If you run Exchange Server 2000 or 2003 you must use the technique
described in the MSDN article, note that you must install/run the code on
the server running Exchange, so if you don't have access to the server
running Exchange, you can forget about eventing.
Note that eventing is a service offered by the smtp service on W2K and
W2K3 and Exchange 2000/2003, this is not part of the standard so other
servers do not apply.
Maybe you could start explaining what problem you had and what you mean
with step 2 in the article.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Thanks repliers,

It is meant for Exchange yes. I know little about Exchange or the
different kind of SMTP. I figured since every SMTP server uses the same
protocol (smtp:P) it doesn't matter what kind of smtp server.

Anyway to be a little more precise, if a person uses outlook, webmail,
telnet, whatever, to send an email, I want to directly check that email
for certain settings. If only I knew how to connect to an smtp server and
get the emails being sent... I take it I have to use SMPT event sinks,
but was wondering if it has to be so difficult:

- I found 2 articles (one on codeproject, and that msdn article) they all
use com objects, with which I have difficulties deploying it to a server
other than my developing pc
- Both articles didn't work for me (the MSDN one is really missing some
files in its download, the codeproject one didn't want to deploy for me)

Is there any other easy tutorial out there or some code samples?

Thanks,

Razzie

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey all,

I need to connect to an SMTP server and get a notification when it gets
a new mail to send. I want to be able to 'read' that email (retrieve
recipient information for example).
Is that possible? After much much researching I came across this article
on MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get stuck
in step 2 even (I have some missing files that supposedely are in the
download, but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie



Nov 16 '05 #6
If you have VS2003 installed with the C++ option enabled, you should find
MIDL.EXE in %VSINSTALLDIR%\ Common7\Tools.
Same goes for 'MailMsg.idl' which is found in
%VSINSTALLDIR%\ VC\PlatformSdk\ include, assumed you selected "Platform sdk"
install during VS setup.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:uw******** ******@TK2MSFTN GP15.phx.gbl...
Thanks for the details.

My first problem was I didn't have midl compiler. I downloaded the
Platform SDK for it. When I ran the nmake.exe program in step 2 of the
msdn tutorial again, it still couldn't find it. So, running Program
Files\Microsoft Visual Studio .NET\Common7\To ols\vsvars32.ba t doesn't
work, since the path for midl is not right.
Then I ran the platform SDK command prompt, now it can find midl.
Now I got an error something like cannot open input file 'MailMsg.idl' and
the program (nmake.exe) aborted. It did find another idl file, just not
that one (and god knows what others it need).

It doesn't say in the MSDN that I need to have anything else installed, so
not to flame, but when I install all this, correct 3 things and still get
errors because I miss a certain file, with no pointers in the MSDN why or
where to get it, I get a bit... angry ;)

Any help with this is appreciated :)

Razzie
"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
If you run Exchange Server 2000 or 2003 you must use the technique
described in the MSDN article, note that you must install/run the code on
the server running Exchange, so if you don't have access to the server
running Exchange, you can forget about eventing.
Note that eventing is a service offered by the smtp service on W2K and
W2K3 and Exchange 2000/2003, this is not part of the standard so other
servers do not apply.
Maybe you could start explaining what problem you had and what you mean
with step 2 in the article.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Thanks repliers,

It is meant for Exchange yes. I know little about Exchange or the
different kind of SMTP. I figured since every SMTP server uses the same
protocol (smtp:P) it doesn't matter what kind of smtp server.

Anyway to be a little more precise, if a person uses outlook, webmail,
telnet, whatever, to send an email, I want to directly check that email
for certain settings. If only I knew how to connect to an smtp server
and get the emails being sent... I take it I have to use SMPT event
sinks, but was wondering if it has to be so difficult:

- I found 2 articles (one on codeproject, and that msdn article) they
all use com objects, with which I have difficulties deploying it to a
server other than my developing pc
- Both articles didn't work for me (the MSDN one is really missing some
files in its download, the codeproject one didn't want to deploy for me)

Is there any other easy tutorial out there or some code samples?

Thanks,

Razzie

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Hey all,

I need to connect to an SMTP server and get a notification when it gets
a new mail to send. I want to be able to 'read' that email (retrieve
recipient information for example).
Is that possible? After much much researching I came across this
article on MSDN:
http://msdn.microsoft.com/library/de...ngmngsinks.asp
but it is *horrible*. I downloaded the needed files for it and get
stuck in step 2 even (I have some missing files that supposedely are in
the download, but they aren't). Anyway, that article won't help me.

Does anyone have any sample code or other good articles about how to
accomplish this?

Thanks,

Razzie



Nov 16 '05 #7
I have VS2002 and not those files installed. I will browse my VS CD's for
them though, hopefully I can find them. Thanks.

"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message
news:OK******** ******@TK2MSFTN GP09.phx.gbl...
If you have VS2003 installed with the C++ option enabled, you should find
MIDL.EXE in %VSINSTALLDIR%\ Common7\Tools.
Same goes for 'MailMsg.idl' which is found in
%VSINSTALLDIR%\ VC\PlatformSdk\ include, assumed you selected "Platform sdk"
install during VS setup.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:uw******** ******@TK2MSFTN GP15.phx.gbl...
Thanks for the details.

My first problem was I didn't have midl compiler. I downloaded the
Platform SDK for it. When I ran the nmake.exe program in step 2 of the
msdn tutorial again, it still couldn't find it. So, running Program
Files\Microsoft Visual Studio .NET\Common7\To ols\vsvars32.ba t doesn't
work, since the path for midl is not right.
Then I ran the platform SDK command prompt, now it can find midl.
Now I got an error something like cannot open input file 'MailMsg.idl'
and the program (nmake.exe) aborted. It did find another idl file, just
not that one (and god knows what others it need).

It doesn't say in the MSDN that I need to have anything else installed,
so not to flame, but when I install all this, correct 3 things and still
get errors because I miss a certain file, with no pointers in the MSDN
why or where to get it, I get a bit... angry ;)

Any help with this is appreciated :)

Razzie
"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
If you run Exchange Server 2000 or 2003 you must use the technique
described in the MSDN article, note that you must install/run the code
on the server running Exchange, so if you don't have access to the
server running Exchange, you can forget about eventing.
Note that eventing is a service offered by the smtp service on W2K and
W2K3 and Exchange 2000/2003, this is not part of the standard so other
servers do not apply.
Maybe you could start explaining what problem you had and what you mean
with step 2 in the article.

Willy.

"Razzie" <ra****@quickne t.nl> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Thanks repliers,

It is meant for Exchange yes. I know little about Exchange or the
different kind of SMTP. I figured since every SMTP server uses the same
protocol (smtp:P) it doesn't matter what kind of smtp server.

Anyway to be a little more precise, if a person uses outlook, webmail,
telnet, whatever, to send an email, I want to directly check that email
for certain settings. If only I knew how to connect to an smtp server
and get the emails being sent... I take it I have to use SMPT event
sinks, but was wondering if it has to be so difficult:

- I found 2 articles (one on codeproject, and that msdn article) they
all use com objects, with which I have difficulties deploying it to a
server other than my developing pc
- Both articles didn't work for me (the MSDN one is really missing some
files in its download, the codeproject one didn't want to deploy for
me)

Is there any other easy tutorial out there or some code samples?

Thanks,

Razzie

"Razzie" <ra****@quickne t.nl> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
> Hey all,
>
> I need to connect to an SMTP server and get a notification when it
> gets a new mail to send. I want to be able to 'read' that email
> (retrieve recipient information for example).
> Is that possible? After much much researching I came across this
> article on MSDN:
> http://msdn.microsoft.com/library/de...ngmngsinks.asp
> but it is *horrible*. I downloaded the needed files for it and get
> stuck in step 2 even (I have some missing files that supposedely are
> in the download, but they aren't). Anyway, that article won't help me.
>
> Does anyone have any sample code or other good articles about how to
> accomplish this?
>
> Thanks,
>
> Razzie
>



Nov 16 '05 #8

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

Similar topics

7
2356
by: Bruce MacDonald | last post by:
I am unable to see the health monitor SQL table functions (e.g.: SQLPROC.HEALTH_CONT_HI). Have I missed a utility which registers the functions? DB2 8.1.3.132 WR21324. Another point about the health monitor - when I get notification messages all they say is that a particular instance/db has a warning or alarm. I have to open the health centre to see what the actual warning / alarm is. I would much prefer if the email had at least a...
0
1036
by: quantumonline | last post by:
Hi, Our SMTP server requires SMTP AUTH. Is there any way to configure the health monitor to use SMTP AUTH? Thanks
3
1739
by: nycjay | last post by:
hello, i am just getting started as a dba. ny current task is to set up notification for health alerts. so, we have the health monitor running, and it is currently putting health alerts (space usage, runstat warnings, etc) into the normal db2diag logs. as i understand it, we can set up the admin server (das?) to send an email or page to a dba when one of these health alters is triggered. what we are trying to do is slightly different...
3
5586
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email account. I was using optimum online service with smtp server as “mail.optonline.net”. I can receive email correctly. Now I switch to verizon DSL. I change my smtp server accordingly as
1
8040
by: bivin | last post by:
hai i am requesting your technical support. please help me. i have been working with this for five days. the problem is relating with the smtp. i am trying to send an email from the asp.net page. earlier it was showing send using not find error.
34
18267
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
0
8987
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
9534
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
9366
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
9316
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
8239
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...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
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...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.