Hello, I have been developing a web application using ROR (hosted on webricks/windows) which makes use of ActionMailer to send out mails to various mailing lists. Recently, we came across a use case which required that a particular user belonging to a mailing list should not be sent out the mails. He cannot be removed from the mailing list either. So I devised something like a negative subscriber list, where we remove the user after expanding the mailing lists. The downside here was that ''outlook-client'' specific rules started breaking for other members of the mailing-list. I came to know that Actionmailer supports envelope viz., ''''Return-Path'''' header for reply-to component of e-mail. I was wondering if there is any way that we can specify such envelopes for TO and CC fields too. I''m looking for something like what we have in sendmail of unix, $sendmail user-Izg6Ufzl9FU@public.gmane.org From:zz-GUPYl0HMNcE@public.gmane.org To: yy-YGFZaMmSOkg@public.gmane.org Subject: Test Hellows.. $ Any help would be of immense help to me. Please do let me know if you require any other information from my end. Regards, Shankar. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 27 May 2008, at 10:25, Shankar Narayanan wrote:> > Hello, > > I have been developing a web application using ROR (hosted on > webricks/windows) which makes use of ActionMailer to send out mails to > various mailing lists. Recently, we came across a use case which > required that a particular user belonging to a mailing list should not > be sent out the mails. He cannot be removed from the mailing list > either. So I devised something like a negative subscriber list, > where we > remove the user after expanding the mailing lists. The downside here > was > that ''outlook-client'' specific rules started breaking for other > members > of the mailing-list. I came to know that Actionmailer supports > envelope > viz., ''''Return-Path'''' header for reply-to component of e-mail. I was > wondering if there is any way that we can specify such envelopes for > TO > and CC fields too.You can set any header you want. In your mailer, set @headers = {''return-path'' => ''foo-+RB1Aph5k6s@public.gmane.org'', ...} Fred> > > I''m looking for something like what we have in sendmail of unix, > > $sendmail user-Izg6Ufzl9FU@public.gmane.org > From:zz-GUPYl0HMNcE@public.gmane.org > To: yy-YGFZaMmSOkg@public.gmane.org > Subject: Test > Hellows.. > > $ > > Any help would be of immense help to me. Please do let me know if you > require any other information from my end. > > Regards, > Shankar. > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 27 May 2008, at 10:25, Shankar Narayanan wrote: > >> remove the user after expanding the mailing lists. The downside here >> was >> that ''outlook-client'' specific rules started breaking for other >> members >> of the mailing-list. I came to know that Actionmailer supports >> envelope >> viz., ''''Return-Path'''' header for reply-to component of e-mail. I was >> wondering if there is any way that we can specify such envelopes for >> TO >> and CC fields too. > > You can set any header you want. In your mailer, set > > @headers = {''return-path'' => ''foo-+RB1Aph5k6s@public.gmane.org'', ...} > > FredFred, Many thanks for your lightning-quick inputs on this. I had tried doing this with something like @cc = ["x@bar.com","y@bar.com"] . . @headers = {''cc'' => ''foo-+RB1Aph5k6s@public.gmane.org''} The mails actually went through to foo-+RB1Aph5k6s@public.gmane.org where as I wanted them to go only to x@bar.com, y@bar.com. Please let me know if I am missing something gross here. Regards, Shankar. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 27 May 2008, at 10:49, Shankar Narayanan wrote:> > Many thanks for your lightning-quick inputs on this. I had tried doing > this with something like > > @cc = ["x@bar.com","y@bar.com"] > . > . > @headers = {''cc'' => ''foo-+RB1Aph5k6s@public.gmane.org''} > > The mails actually went through to foo-+RB1Aph5k6s@public.gmane.org where as I wanted > them to > go only to x@bar.com, y@bar.com. >Well you''d have to say {''cc'' => @cc} for this to have a chance of working. Fred> Please let me know if I am missing something gross here. > > Regards, > Shankar. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 27 May 2008, at 10:49, Shankar Narayanan wrote: > Well you''d have to say {''cc'' => @cc} for this to have a chance of > working. > > FredAh! my mistake. If I understand this right, once we set the header fields, they would be ones to which the mails will be sent. What I want is something like sendmail where the recipients are different from what is indicated by the headers.. I''ll put it this way... x,y ,z are members of the list ''foo'' and: @cc = ["x@bar.com","y@bar.com","z@bar.com"] Here z should not be sent a mail, and the cc fields for the mails sent to x and y should still read the cc fields as ''foo''. ~Shankar. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 27 May 2008, at 11:09, Shankar Narayanan wrote:> > Frederick Cheung wrote: >> On 27 May 2008, at 10:49, Shankar Narayanan wrote: >> Well you''d have to say {''cc'' => @cc} for this to have a chance of >> working. >> >> Fred > > Ah! my mistake. If I understand this right, once we set the header > fields, they would be ones to which the mails will be sent. What I > want > is something like sendmail where the recipients are different from > what > is indicated by the headers..ActionMailer doesn''t have anything for specifiying recipients as arguments to sendmail. You''d have to do that yourself Fred> > > I''ll put it this way... > > x,y ,z are members of the list ''foo'' and: > > @cc = ["x@bar.com","y@bar.com","z@bar.com"] > > > Here z should not be sent a mail, and the cc fields for the mails sent > to x and y should still read the cc fields as ''foo''. > > ~Shankar. > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 27 May 2008, at 11:09, Shankar Narayanan wrote: > >> want >> is something like sendmail where the recipients are different from >> what >> is indicated by the headers.. > ActionMailer doesn''t have anything for specifiying recipients as > arguments to sendmail. You''d have to do that yourself > > FredOkay. Given that the application is hosted on a windows server, I dont think its possible to implement sendmail in my case. Please correct me if I am missing something. Thanks so much for all your help on this. ~Shankar. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---