hesedel / Garagesale

http://garagesale.pajaroncreative.com/
0 stars 0 forks source link

build backend of item-contact form #18

Open hesedel opened 10 years ago

hesedel commented 10 years ago

Poster receives email from: replier.< item-id >.< unique-conversation-code >@users.garagesale.ph

Replier receives email from: poster.< item-id >.< unique-conversation-code >@users.garagesale.ph

hesedel commented 10 years ago

FLOW?

  1. replier sends message DONE
  2. system stores data in table DONE
  3. system creates 2 new email accounts: DONE replier.< item-id >.< base_conver(id, 10, 36) >@users.garagesale.ph poster.< item-id >.< base_conver(id, 10, 36) >@users.garagesale.ph
  4. system sends message FROM: replier's email address TO: poster.< item-id >.< id >@users.garagesale.ph
  5. system detects new email in poster.< item-id >.< id >@users.garagesale.ph create email forwarders for step 7
  6. system forwards email FROM: replier.< item-id >.< id >@users.garagesale.ph TO: poster's email address
  7. poster replies to replier.< item-id >.< id >@users.garagesale.ph
  8. system detects new email in replier.< item-id >.< id >@users.garagesale.ph create email forwarders for step 11
  9. system detects if poster is using different email address and updates db accordingly
  10. system forwards email FROM: poster.< item-id >.< id >@users.garagesale.ph TO: replier's email address
  11. replier replies to poster.< item-id >.< id >@users.garagesale.ph
  12. system detects new email in poster.< item-id >.< id >@users.garagesale.ph
  13. system detects if replier is using different emaill address and updates db accordingly
  14. system forwards email FROM: replier.< item-id >.< unique-conversation-code >@users.garagesale.ph TO: poster's email address
hesedel commented 10 years ago

DB Table Stucture

name type index default
id int pk autoinc
created
updated
item_id int fk not null
user_id_replier varchar fk null
replier_email varchar null
replier_name varchar null
user_id_poster varchar fk not null
hesedel commented 10 years ago

TODO JANX:

emailing poster.9.1@int.users.garagesale.pajaroncreative.com should forward to janzen.biz@gmail.com emailing replier.9.1@int.users.garagesale.pajaroncreative.com should forward to janzen.contact@gmail.com

TODO HES:

hesedel commented 10 years ago

Janx, I was thinking, pwede na yata tanggalin ang creation of email accounts. The email forwarders already do the job, email accounts are no longer needed since emails are forwared to pipe.php, I don't think the emails reach the account anymore. We can instead create a table for all the correspondence between the two users.

So when we make an admin interface to monitor these, we can see all the conversations on an item separated by the replier email address.