How do I make an email system that works for my site?

I want to build an app where users can send emails within the site, as
well to a client like gmail. Sort of how myspace.com sends emails
within its self, As well as gmail. Is there a book that explains how to
do both?

Thanks.

Quoting Mr Mody <lists@ruby-forum.com>:

I want to build an app where users can send emails within the site, as
well to a client like gmail. Sort of how myspace.com sends emails
within its self, As well as gmail. Is there a book that explains how to
do both?

The answer depends enormously on what the operating system is.

Jeffrey

Quoting Mr Mody lists@ruby-forum.com:

I want to build an app where users can send emails within the site, as

well to a client like gmail. Sort of how myspace.com sends emails

within its self, As well as gmail. Is there a book that explains how to

do both?

The answer depends enormously on what the operating system is.

Also, I think if you write something which just sends messages within a site, that is much easier.
Adding outgoing smtp should not be too big of a deal on any os, but you also have to account for the outgoing address and whether every user will have a different one (and whether users will assign their yahoo, gmail, etc. account to be the sender).

The most complex would be to receive response emails and routing them, and that would be OS specific.

None of it is impossible… if you are just starting out I would start with easiest and ease into the more complex.

thank you for feedback. I think action mailer is good, but I really need
to build a site with its own email or notice system.

So you'd want to model that. Sounds like a user can have many messages. You need to think about how you model the details with messaging. Most common approach is to have a message domain object, but bear in mind that if you go that way, if recipient deletes message, the message should still exist as the sender may not have deleted it from their outbox. Generally a User sends-a message which has a sender-mailbox and a recipient-mailbox as well as a recipient.

You're going to want to think about business rules (how long messages can be kept), scaling issues and things like database indexes if you're looking to have a messaging based system for a large number of users. Did one recently for a site with a couple of million of members and it's non-trivial. We're actually looking to port the messaging piece from a clustered SQL db to a NoSQL key-value store with a Clojure or Scala RESTful service wrapping it (it was a JVM project).

Best Wishes,
Peter