Google Answers Logo
View Question
 
Q: how to impliment a craigslist.com like email relay in c#? ( No Answer,   2 Comments )
Question  
Subject: how to impliment a craigslist.com like email relay in c#?
Category: Computers > Programming
Asked by: mlfolk_wa-ga
List Price: $8.00
Posted: 15 Mar 2005 18:18 PST
Expires: 14 Apr 2005 19:18 PDT
Question ID: 495324
I am looking for a email relay solution such as craigslist.com used:

take a look at this: https://post.craigslist.org/sfo/S/pts/pen/74

when you enter an email, you have an option to use anonymous email. so
when others send mail to you, they are sending it to an anonymous
email and then craigslist replace your email and send the mail to you.
others dont see your email but their mails can be relayed to you.

I would like to know if anyone has idea to implement this in windows
rather than in unix or linux. better, if there is a sample to do it in
(C#).net.

I dont have a control on the mail server such as exchange server, so
any work involves treaking the mail server would not work for me.

thanks

Clarification of Question by mlfolk_wa-ga on 17 Mar 2005 13:48 PST
To willcodeforfood-ga:

I am using the hosted service for this app. I hosted at godaddy.com. I
am not exactly sure what mail server they are using. I am using .net
System.Web.Mail component to send my email. I am using SQL server. I
can setup a catch all mailbox. but I am not sure how to read the
comming email sent to the catch all email address.

any help would be greatly appreciated.

thanks
Answer  
There is no answer at this time.

Comments  
Subject: Re: how to impliment a craigslist.com like email relay in c#?
From: willcodeforfood-ga on 17 Mar 2005 11:55 PST
 
You can do it without tweaking the mail server.  Exactly how would
depend on a few details.

What mail server will your application be using?  Are you running this
on a computer at home, work, or a hosted computer?  What sort of
database resources do you have, Access, SQL Server, other, none?  You
can do it without database support, but it will be more complicated. 
Do you have a catch-all mailbox for emails going to a single domain or
just a single email address?
Subject: Re: how to impliment a craigslist.com like email relay in c#?
From: willcodeforfood-ga on 17 Mar 2005 15:07 PST
 
I'm guessing that Godaddy will support POP access to your email
accounts.  First you need to get a .Net component for getting into
those email accounts using POP or SMTP.  You should be able to do this
from any computer connected to the Internet, specifically I'm figuring
your home computer.  That way you can poll the mailbox frequently for
new mail.  This is the first hurdle you have to get over-- opening a
Godaddy mailbox and sending/receiving email.  While it may not be the
hardest step, it's the most critical because this functionality is
governed by forces outside your control.  There's no need developing
any further until you can get past this step.

Dart is very well known for good components, but they are not free:
[ http://www.dart.com/popdotnet.asp ]

You can try your luck with a freebie library:
[ http://www.c-sharpcorner.com/Code/2003/Sept/SMTPPOP3IMAPLibrary.asp ]

Or search for more.  I used the terms: c# pop mail

=================================================

Next, you've got to figure out a strategy for hiding the sender's
email address from the recipient.  A database would be a good method
to do this, just use an alias or generate a large random character
string and replace the sender's email with it:

you receive:

    From:    dontseeme@privateplace.com
    To:      somedude@somedomain.com
    Subject: Test Message

generate and put something like this in your database...

    biglongstringofnonsense = dontseeme@privateplace.com

and the outgoing mail will look like...

    From:    biglongstringofnonsense@mlfolk.com    <-- replace mlfolk.com with 
    To:      somedude@somedomain.com                   your domain name
    Subject: Test Message

When the reply comes back as...

    From:    somedude@somedomain.com
    To:      biglongstringofnonsense@mlfolk.com
    Subject: Re: Test Message - hello

you look up "biglongstringofnonsense" in the database and then return to sender

    From:    somedude@somedomain.com
    To:      dontseeme@privateplace.com
    Subject: Re: Test Message - hello

=================================================

If you use a random string, use large (~20 characters) nonsequential
strings.  Keep in mind email addresses are not case-sensitive, so only
use upper or lowercase letters.  Log any invalid addresses so you can
debug, resolve and track hacking.

If, however, you want to avoid a database implementation, you'll need
to use a strong two-way encryption algorithm (i.e. not a hash).  I'd
use AES since it's in the public domain and included in the .Net
classes.  Just salt and encrypt the sender's email like this:

sender:                        dontseeme@privateplace.com
add salt to get:               !@#$dontseeme@privateplace.com
now encrypt to get:            biglongstringofnonsense
send email from:               biglongstringofnonsense@mlfolk.com

[ ... some time passes... ]

email comes back addressed to: biglongstringofnonsense@mlfolk.com
strip off domain to get:       biglongstringofnonsense
decrypt to get:                !@#$dontseeme@privateplace.com
remove salt to get sender:     dontseeme@privateplace.com


=================================================

The database method is nice because you can use an alias in place of
the sender's identity.  That way the recipient knows who he is talking
to but just doesn't see the email address.  This is common in online
chat forums and dating sites.  The encryption method is nice because
it requires very few resources and is not prone to failure should the
database become unavailable.  Either method can support making each
message unique so the recipient would be unaware that two different
emails came from the same sender.  With either approach, you'll need
to set up your email on Godaddy so it all goes into the catch-all
mailbox.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy