CuriousNewbie
2010-Nov-15 21:40 UTC
Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)
Hello, Right now my app sends out email notifications. I''d like to allow the user to reply directly to the email, which then gets ingested by my app and inserted into the database. Are there any Rails gems, services, tutorials that can point me in the right direction. Also, probably need to make the reply-to email have a UID, replyto-- UID-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org, so I don''t have to rely on the from (sender). What do you think? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Brian Troutwine
2010-Nov-15 21:46 UTC
Re: Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)
Have you seen this: http://guides.rubyonrails.org/action_mailer_basics.html On Mon, Nov 15, 2010 at 4:40 PM, CuriousNewbie <bhellman1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > Right now my app sends out email notifications. I''d like to allow the > user to reply directly to the email, which then gets ingested by my > app and inserted into the database. > > Are there any Rails gems, services, tutorials that can point me in the > right direction. > > Also, probably need to make the reply-to email have a UID, replyto-- > UID-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org, so I don''t have to rely on the from (sender). > > What do you think? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
CuriousNewbie
2010-Nov-15 22:04 UTC
Re: Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)
Thanks Brian. I have. That URL covers sending emails really well. But reeving, creating UUID in the reply address, and handling scalability on Heroku are topics it lacks. Given this is a real trendy thing to do these days, I was hoping to leverage someone''s thoughts on the process. Thoughts? On Nov 15, 1:46 pm, Brian Troutwine <br...-MmYI4SXeg2M3tL2svhKZZQ@public.gmane.org> wrote:> Have you seen this:http://guides.rubyonrails.org/action_mailer_basics.html > > > > > > > > On Mon, Nov 15, 2010 at 4:40 PM, CuriousNewbie <bhellm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hello, > > > Right now my app sends out email notifications. I''d like to allow the > > user to reply directly to the email, which then gets ingested by my > > app and inserted into the database. > > > Are there any Rails gems, services, tutorials that can point me in the > > right direction. > > > Also, probably need to make the reply-to email have a UID, replyto-- > > U...-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org, so I don''t have to rely on the from (sender). > > > What do you think? > > > Thanks > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Nov-15 22:20 UTC
Re: Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)
CuriousNewbie wrote in post #961680:> Thanks Brian. I have. That URL covers sending emails really well. But > reeving,Not possible with Rails alone AFAIK (at least not easily so).> creating UUID in the reply address,The reply address is just a string. You can do all the usual string operations on it.> and handling scalability > on Heroku are topics it lacks.What about scalability?> Given this is a real trendy thing to do > these days, I was hoping to leverage someone''s thoughts on the > process."Leverage" someone''s thoughts? What?> > Thoughts?Well, you''ll need Procmail or something to retrieve the mail and send it to your Rails app. Then you can have Rails take it from there... Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Nov-15 22:24 UTC
Re: Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)
Marnen Laibow-Koser wrote in post #961688:> CuriousNewbie wrote in post #961680: >> Thanks Brian. I have. That URL covers sending emails really well. But >> reeving, > > Not possible with Rails alone AFAIK (at least not easily so). >Or maybe it is now. Anyway, http://lmgtfy.com?q=rails+receive+email appears to yield lots of useful resources. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
dear all, This may sound stupid, but I''m confused in creating the model relationship. I set these 4 models: ComUser < ActiveRecord::Base belongs_to :DefKelamin belongs_to :DefUserRole belongs_to :DefJabatan Migration: create_table :com_users do |t| t.timestamps t.references :def_jabatan, :null => false t.integer :def_kelamin_id, :null => false t.references :def_user_role, :null => false t.column :username,''varchar(20)'', :null => false t.column :password,''varchar(20)'', :null => false end DefJabatan < ActiveRecord::Base has_one:ComUser Migration: create_table :def_jabatans do |t| t.timestamps t.column :jabatan,''varchar(20)'', :null => false end DefUserRole has_one:ComUser Migration: create_table :def_user_roles do |t| t.timestamps t.column :role,''varchar(20)'', :null => false t.string :description, :null => false t.string :icon end DefKelamin < ActiveRecord::Base has_one :ComUser Migration: create_table :def_kelamins do |t| t.timestamps t.column :kelamin,''varchar(10)'', :null => false end In the controller, I put a simple query: @users = ComUser.find(:first) and in the view, i simply put a object debug: <%=debug(@users)%> and I get this: --- !ruby/object:ComUser attributes: def_jabatan_id: "1" created_at: 2010-11-16 04:31:35 def_user_role_id: "1" gsm: "-" updated_at: 2010-11-16 04:31:35 alamat: "-" username: admin id: "1" def_kelamin_id: "1" password: admin online_status: "2" attributes_cache: {} I''m getting a feeling that I didn''t set the relationship right, because i don''t see any attributes from the model started with Def-something that i create above.. Am I missing something here? I''ve been staying wake all night to sort this thing out, with no success. I even tries to alter the table by implicitly put a foreign key in the table for ComUser model using sql statements, and the debug result is still the same. How can i make this relationship work? Thanks Regards, Arga -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
arga aridarma wrote in post #961693:> dear all, > This may sound stupid, but I''m confused in creating the model > relationship.[...] Please don''t hijack threads. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
eh? what do you mean by hijack the threads? Regards, Arga ----- Original Message ---- From: Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sent: Tuesday, November 16, 2010 6:12:15 Subject: [Rails] Re: model relationship fails? arga aridarma wrote in post #961693:> dear all, > This may sound stupid, but I''m confused in creating the model > relationship.[...] Please don''t hijack threads. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
He''s suggesting that if you want to ask a new question, you create a new subject line and post a separate email. Keeps it easier for everyone to follow the content for a given topic. FWIW, I''m not jumping in with an opinion on whether your request was relevant to the original thread or not - wasn''t following it. Just describing what people usually mean when they say "hijacking threads" and aren''t talking about some kind of weird concurrency bug :) Best Wishes, Peter On Nov 15, 2010, at 6:22 PM, arga aridarma wrote:> eh? > what do you mean by hijack the threads? > > Regards, > Arga > > > > ----- Original Message ---- > From: Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Sent: Tuesday, November 16, 2010 6:12:15 > Subject: [Rails] Re: model relationship fails? > > arga aridarma wrote in post #961693: >> dear all, >> This may sound stupid, but I''m confused in creating the model >> relationship. > [...] > > Please don''t hijack threads. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby > on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ah, sorry. I wasn''t aware that there is already a thread called "model relationship fails?" before. So, I will restart my question in the new email. Hopefully this time, it does not hijack another thread. Thanks regards, Arga ----- Original Message ---- From: Peter Bell <peter-AS9tOuWgs4cAvxtiuMwx3w@public.gmane.org> To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sent: Tuesday, November 16, 2010 6:32:49 Subject: Re: [Rails] Re: model relationship fails? He''s suggesting that if you want to ask a new question, you create a new subject line and post a separate email. Keeps it easier for everyone to follow the content for a given topic. FWIW, I''m not jumping in with an opinion on whether your request was relevant to the original thread or not - wasn''t following it. Just describing what people usually mean when they say "hijacking threads" and aren''t talking about some kind of weird concurrency bug :) Best Wishes, Peter On Nov 15, 2010, at 6:22 PM, arga aridarma wrote:> eh? > what do you mean by hijack the threads? > > Regards, > Arga > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 Nov 2010, at 00:58, arga aridarma wrote:> Ah, sorry. I wasn''t aware that there is already a thread called "model > relationship fails?" before. > So, I will restart my question in the new email. Hopefully this > time, it does > not hijack another thread.You misunderstood. When you press "Reply" on a thread with a completely different subject (in your case "Rails 3 - Handle Incoming Messages (Allowing Users to reply to email notifications)") and delete the text and subject to replace with your own, most e-mail clients will still consider your message part of the thread (since there are hidden headers that you haven''t gotten rid off). Next time just click "New Message". Best regards Peter De Berdt -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.