Levi
Levi

Reputation: 12482

Best way to send anonymous email like craigslist

Craigslist has a nice feature where when you respond to a poster you respond to an email such as [email protected]. The email is then in turn directed to the real email.

I am looking for a couple pointers on how to do this with PHP.

Thanks,
Levi

Upvotes: 11

Views: 9126

Answers (3)

ceejayoz
ceejayoz

Reputation: 180126

This is usually done by piping an e-mail address (often, a catch-all address) to PHP. Here's a tutorial on doing it that should get you started in the right direction.

Upvotes: 6

Erick
Erick

Reputation: 6089

The most probable solution is by doing what they called as Email Piping.

They insert the ad with an identifier like this:

*job-fepsd-1120347193*

alongside with the real email.

Then they receive the email by piping it to a PHP script. You can check Google for PHP and Piping where you will find good resources on the subject.

The script then searches for this Unique Identifier and associates it with a real email.
Then it forwards the email received to the real person.

There is also another possible solution (but less possible), they might be using POP3.
Then they would just make a check every X minutes on a catch-all address and then forward the message to the right person.

Upvotes: 3

Joshua
Joshua

Reputation: 3515

Elastic Email has a simple API for creating two-way anonymous email routing just like craigslist or airbnb. It uses an inbound email api to call a web-hook on your server to resolve the correct email addresses and then relays the email accordingly. It only takes a few lines of code. They have a detailed tutorial here:

https://elasticemail.com/blog/marketing_tips/how-to-build-an-anonymized-email-relaying-feature-using-elastic-email/

Upvotes: 1

Related Questions