0

I am looking into an application that needs to check that emails are being sent and received. Using asp.net to send emails is easy and not a problem, but putting in the processes to enable code to wait for and verify incoming emails is not supported.

So the best solution we have come up with is to use a COM connection to a Lotus mail client ( which is what the client use ) and process it in that way. But it struck me that this is a bit of a hack together.

So is there a way of using an SMTP server and asp.net code to look at emails and verify them coming into a specific email address?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Schroedingers Cat
  • 3,099
  • 1
  • 15
  • 33
  • Possible duplicate of [Read MS Exchange email in C#](https://stackoverflow.com/questions/652549/read-ms-exchange-email-in-c-sharp) – Cœur Dec 13 '18 at 05:49

2 Answers2

0

You can access a pop email direct with code using a library such as:

http://sourceforge.net/projects/hpop/

We did this in conjuction with email blasts so we could monitor the mailbox for bounce backs.

box86rowh
  • 3,415
  • 2
  • 26
  • 37
0

SMTP is used for sending e-mail.

You need to hook into a POP3, IMAP or Exchange server to monitor for received messages.

Can you explain some more about the process that you're trying to automate? Are you trying to detect invalid e-mail addresses? If so, you can monitor a mailbox associated with the sending user for 'bounce' messages.

Steve Morgan
  • 12,978
  • 2
  • 40
  • 49
  • Yes that is basically it - the requirement is to monitor that emails can get in and out. Sending a bounce will verify this, but it needs to be verified within the organisation - so that it gives an indication that the internal email system should be working. – Schroedingers Cat Jul 26 '11 at 11:54
  • 1
    You could send one of the e-mails to a dummy mailbox that you also monitor. But as for how to monitor the relevant mailboxes, that's down to the particular incoming mail server and the facilities it offers. I note you referred to Lotus in your question, and I weep for you... – Steve Morgan Jul 26 '11 at 11:58
  • My feeling is that this is the only answer. I was just hoping someone would say it wasn't. And Lotus - well beggers ( and consultants ) can't be choosers. – Schroedingers Cat Jul 26 '11 at 12:05