Web Application needs to detect and retrieve emails

  • Thread starter Thread starter Richard Thornley
  • Start date Start date
R

Richard Thornley

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
 
Hello,

Thanks for the reply. I need to check but I believe the email is going to a
standalone email server which might even be a Unix. If that is true then
this solution will not work. The good news is I did learn some about the
FileSystemWatcher class that I did not know before. Thanks!

Cheers,
Richard
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top