You have a lot of options on this Richard; as Ken points out you first want
to define your mailserver support requirements, e.g.
? Is all your email going into an Exchange server
? Are these dedicated email addresses that only your application will be
monitoring
? If yes, are you planning to receive this mail locally using
Outlook or something similar
? Do you need to access outside mail servers
Once you know this, you can choose to support (at least) three different
ways of getting at the email;
+ By reading directly from the mailserver using proprietary APIs (e.g.
Exchange)
+ using mailserver-specific OLE automation (or other APIs)
+ by using Outlook OLE automation
+ by using POP/IMAP
+ By reading files in a local mailstore, on your own HDD;
+ using Outlook OLE automation
+ by reading files directly
+ by reading files using a third-party library
+ By using POP/IMAP
+ via Microsoft's built-in collaboration data objects (CDO)
+ via third-party libraries
I would use POP/IMAP in nearly all cases since it's the most standards-based
solution. It works fine with Exchange or any other mailserver, so you're
covered if your support requirements ever have to change. I also prefer it
over using a local mailstore, because it keeps my configuration centralized,
and I'm not reliant on a separate client app to get my email for me.
For POP support I use a third-party email library from
www.advancedintellect.com that works very smoothly.
All the best,
/// M
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:#2**************@TK2MSFTNGP10.phx.gbl...
Hey Richard,
Not a guru, but I would think that if the email is going into a folder on
the server, you just need to use the FileSystemWatcher Class to detect the
presence of an email.
It seems like a service would be better for this than a Web application.
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfSystemIOFileSystemWatcherClassTopic.asp
Ken
"Richard Thornley" <rh**@thorsoft.com> wrote in message
news:OD****************@tk2msftngp13.phx.gbl... Hello,
I was just been given a project and I have some questions on how to
accomplish the first part of the task.
If a user sends an email to a specific email address I need to detect
that an email is waiting and then retrieve the email. I will then process the
email but that part of the task is not a problem. The problem is how to
detect that an email is waiting. Can this be accomplished with ASP or
will I need to write this in .NET or if there is another way to accomplish
this task. I was thinking of a timer to poll the email address periodically
but I do not think I can use a timer in ASP, which is why I am thinking a
..NET application. I was also thinking that there might be a third-party
control that I could use but would really rather not use a control if possible.
My current choice is to do this in ASP as our website currently resides
on a shared server that does not support .NET. My gut feeling is that we
will need to move the site to a shared server that supports .NET or we might
need to move to a dedicated server.
Any advice from the Guru's in this forum (and the non-Guru's) would be
greatly appreciated.
Cheers,
Richard