views:

397

answers:

3

Writing my own "craigslist" in .NET, trying to figure out how to create disposable email aliases (craigslist type)?

Here's what I mean by "craigslist style".

My website is: somecoolurl.com

User creates an account, but doesn't want to give his/her email out as contact when posting on the site.

I want to give the user a TEMP email [email protected] and alias that to their real email. When the user wants to get a new email, the TEMP gets canned and a new email gets created.

A: 

Hmm, not exactly sure what you're referring to with "craigslist" but I do know that in an app that I currently built, I purchased the SmarterMail app from http://smartertools.com and used their .NET API as part of my software.

When a user signs up and pays, I generate a random string (you could make it more meaningful if you want) and then append it to the domain name ([email protected])

From there I create the email address via the SmarterMail API and assign the password based on the users existing password.

Then I have a watcher the checks to see if the paid subscription lapses... if it does, I disable the account for X days. If the user doesn't renew after X days, the watcher deletes the account (this keeps my total users down since I didn't pay for the unlimited license yet).

Works very well.

rockinthesixstring
will emails sent to [email protected] be forwarded to user's real email? can you create [email protected] and re-alias it with user's real email?
roman m
Yes you can create alias's as well. My users wanted a private email that did not get mixed in with their regular accounts, so I never bothered. But it is possible to make aliases.
rockinthesixstring
look here "do a find for the word Alias" - http://www.smartertools.com/SmarterMail/Compare-Mail-Server-Editions.aspx
rockinthesixstring
+2  A: 

Are you talking about email address piping? Check out this SO question Best way to send anonymous email like craigslist

Here is how to pipe incomming mail on IIS

Tadas
+1, any way to do it with asp.net/c# ?
roman m
Implementation example would be interesting for me too. Especialy using IIS.
Tadas
A: 

Set up a catch-all account. Then use C# to log in with IMAP or POP and forward according to your rules.

Esben Skov Pedersen