By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,154 Members | 1,024 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,154 IT Pros & Developers. It's quick & easy.

Monitor SMTP server

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
> 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

P: n/a
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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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

P: n/a
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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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

P: n/a
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****@quicknet.nl> wrote in message
news:em*************@tk2msftngp13.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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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

P: n/a
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\Tools\vsvars32.bat 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****************@TK2MSFTNGP11.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****@quicknet.nl> wrote in message
news:em*************@tk2msftngp13.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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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

P: n/a
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****@quicknet.nl> wrote in message
news:uw**************@TK2MSFTNGP15.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\Tools\vsvars32.bat 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****************@TK2MSFTNGP11.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****@quicknet.nl> wrote in message
news:em*************@tk2msftngp13.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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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

P: n/a
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**************@TK2MSFTNGP09.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****@quicknet.nl> wrote in message
news:uw**************@TK2MSFTNGP15.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\Tools\vsvars32.bat 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****************@TK2MSFTNGP11.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****@quicknet.nl> wrote in message
news:em*************@tk2msftngp13.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****@quicknet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.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 discussion thread is closed

Replies have been disabled for this discussion.