Question

I need some suggestions how to deal with the following situation. I'm building a website with a userbase in multiple groups. i would like to create a mailinglist with a emailadress like:

groupA@domain.com 

The mailaddresses reflect the groups in my application, messages are forrwarded to the members of the group.

A new group or member in the application should update the mailnglist settings. Any idea witch applications or services would help me to accomplish this? I'm considering Google Apps, but i believe in that case i can only use mailadresses bound to a Google account.

Était-ce utile?

La solution

Let me first clarify to make sure I know what you're looking for:

  1. you want to be able to email the entire group by emailing to a single group email address
  2. you want to dynamically update the group with new users from your web backend
  3. you want to do all of this without running your own mailserver

... I'm not sure you can get all of that.

What you're looking for is a 3rd party mail host that provides you with an API that allows you to dynamically update group membership. Google Apps may allow that, you'll have to check through their API references (a promising place to start), but I'm not sure if that's available on the free tier or not. I do know that you can include non-domain email addresses in the groups (i.e. if you sign up for Google Apps under example.com, you can send to email addresses that aren't @example.com). But, after a quick perusal, I'm not sure if they allow quite that level of access, and it's going to be some slogging through to even figure out if you can do what you want.

If Google Apps doesn't do it for you, here's a (possibly dated) list of email services (most likely non-free) that provide an API: http://blog.programmableweb.com/2007/12/05/16-online-email-apis/

If you determine that one of the 3 points above is not important, then the job becomes easier. If it's OK to email each person individually, then simply manage their group memberships as suggested by other answers here, and loop through their email addresses to message them. Likewise running your own mailserver.

Why is it (if I've understood correctly) that it's important to email just a single group address?

Autres conseils

If you look at this answer: How do I receive email and process it in a web application you can see where to go to get started on getting the email into your PHP application. (You will of course need to have a mailbox(es) for the email address(es) / mx forwarding to such).

When emails are found you can then do a lookup in the DB for all addresses in the relevant group for the to address of the email if valid. Then you can use PHPMailer or similar to actually send mails.

You should create 2 tables like this:

table group: id and name

table emails: id, groupid, email

so when a group is added just adding a new row to group table and a new email is added just adding a new row to email table with the groupid related and then you can get query from group and email tables to send emails according to groupid.

Can be implemented in any programming language and database.

Have a look at the Rumble Mailserver, its configuration is stored in a mysql database, so you may easily manage it within your website?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top