Question

I guess this is sort of two questions that are tied together.

Related questions have discussed how to read and parse email using pop3. I need to be able to do this, however, I want this to be able to work with any email address I need.

I am trying to allow users to submit content by emailing it to a unique email address, which will automatically know to which account the content should be associated.

Is there a good way to create these email addresses on the fly in C# and check these email accounts so for content submissions?

Alternatively is there a way to make a "wildcard" email account which gets all of the email sent to the domain and allows me to see what the to address was?

Was it helpful?

Solution

Most email servers will allow you to route all undeliverable email to a specific mailbox (though the details on how to do it will depend on the mail server). From there you should be able to get the address it was sent to from the To header of the message.

OTHER TIPS

A much better method is to skip the inbox/POP-checking altogether and have your MTA (Message transfer agent) "send" incoming emails straight to your application.

Here's an example setup with PHP: http://www.evolt.org/incoming_mail_and_php

Alternatively is there a way to make a "wildcard" email account which gets all of the email sent to the domain and allows me to see what the to address was?

Yes its called catch all:

http://en.wikipedia.org/wiki/Catch-all

It depends on your domain host/who you are using to handle your email on the specifics of how to do it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top