Re: [Radiant] Re: send multiple emails with mailer?

2011-03-18 Thread Jim Gay
On Sun, Feb 27, 2011 at 7:05 PM, craayzie flesh...@gmail.com wrote:
 Wow. Ok. I've never forked anything before and I know very little Ruby
 but I'm willing to take a shot at it if it's the right way to go :P
 If anyone else has guidance on how to best proceed please let me know.
 Otherwise I'll consider both Will's and Marc's suggestions and decide
 which one makes the most sense for me. I like the idea of forking the
 extension and making a contribution but I'm also concerned about the
 amount of time it will take me to make that happen given how new I am
 to RoR/Radiant.

 Thanks for all the help guys.

Get started and post any questions you have if you run into trouble.


 On Feb 27, 1:35 pm, William Ross w...@spanner.org wrote:
 On 27 Feb 2011, at 19:16, craayzie wrote:

  If someone could jump in and provide guidance on how to best implement
  sending multiple emails upon form submission that would be huge. I'd
  hate to spend time working on an implementation only to figure out
  afterwards that it wasn't the best approach.

 My advice, for what it's worth, would be to fork the mailer extension, make 
 the very simple changes required to specify several messages in the 'mailer' 
 part, and request that they are pulled.

 best,

 will




-- 
Jim Gay
Saturn Flyer LLC
http://www.saturnflyer.com
571-403-0338


[Radiant] Re: send multiple emails with mailer?

2011-02-27 Thread craayzie
If someone could jump in and provide guidance on how to best implement
sending multiple emails upon form submission that would be huge. I'd
hate to spend time working on an implementation only to figure out
afterwards that it wasn't the best approach.

Marc - your suggestion makes a lot of sense. Just want to make sure
I'm not missing anything before going that route :P

On Feb 26, 7:11 pm, Marc marc.bosc...@gmail.com wrote:
 Umm, far be it for me to express what is the standard / recommended
 Radiant Way™. It is still very early days for me and Radiant (not to
 mention blowing the dust off my Ruby and Rails knowledge).

 I just saw it as a way to achieve multiple behaviour from the one
 transaction without forking the code. That said many people do seem to
 fork things to get what they want, and push back if they are generous.
 The prefix addition would be a natural example of forking rather than
 just creating an additional extension, in your case.

 I've used mailer for a simple contact form. My cursory look at the
 code didn't suggest a clean way to be able to use the one form
 submission to generate two separate emails.

 Marc

 On Feb 25, 8:13 am, craayzie flesh...@gmail.com wrote:







  Thanks for replying Marc. I could definitely go this route .. I'm
  curious though - is there no way to do this w/ Mailer?

  The solution you describe seems like a work-around as opposed to the
  standard/recommended way one would do it. Do I have the wrong
  impression or is this the recommended way of sending multiple emails
  upon form submission w/ Radiant?

  On Feb 22, 3:25 pm, Marc marc.bosc...@gmail.com wrote:

   You could always usehttps://github.com/dirkkelly/radiant-forms-extension
   and create an add-on which uses different page parts to the built in
   form mail add-on to send the other email.

   I'm in the process of creating an add-on to store the form results in
   a table. See radiant-forms-extension/app/models/form_mail.rb for the
   built in add-on

   The trick is that add-ons are called in order expressed in the
   'config' page part.

   eg.

   storing:
     extension: store # my custom add-on, could always dup the form mail
   add-on; see the source
     result: *email_field_references…*
   mailing:
     extension: mail # usual example in documentation
     fields:
       from: person[email]
       to: person[email]
       subject: contact[subject]
       reply_to: person[email]

   Ideally if the built in form mail code was augmented to take an
   optional prefix then multiple instances of the add-on could be used…

   e.g.
   mailing_user:
     extension: mail # uses usual page parts: content, etc.
     fields:
       from: person[email]
       to: person[email]
       subject: contact[subject]
       reply_to: person[email]

   internal_mailer:
     extension: mail
     prefix: 'internal-'  # would use page parts: internal-content, etc.
     from: em...@email.com
     to: em...@email.com
     reply_to: em...@email.com
     fields:
       subject: contact[subject]

   Regards,

   Marc

   On Feb 22, 8:44 am, craayzie flesh...@gmail.com wrote:

I've installed the mailer extension and it works great! I'd like to
send a thank you for contacting us email to the form submitter in
addition to receiving a notification email letting me know that
they've submitted a form. Unfortunately, I don't see a way to send
multiple emails with mailer ..

Thanks for pointing me in the right direction!


Re: [Radiant] Re: send multiple emails with mailer?

2011-02-27 Thread William Ross
On 27 Feb 2011, at 19:16, craayzie wrote:

 If someone could jump in and provide guidance on how to best implement
 sending multiple emails upon form submission that would be huge. I'd
 hate to spend time working on an implementation only to figure out
 afterwards that it wasn't the best approach.

My advice, for what it's worth, would be to fork the mailer extension, make the 
very simple changes required to specify several messages in the 'mailer' part, 
and request that they are pulled.

best,

will




[Radiant] Re: send multiple emails with mailer?

2011-02-27 Thread craayzie
Wow. Ok. I've never forked anything before and I know very little Ruby
but I'm willing to take a shot at it if it's the right way to go :P
If anyone else has guidance on how to best proceed please let me know.
Otherwise I'll consider both Will's and Marc's suggestions and decide
which one makes the most sense for me. I like the idea of forking the
extension and making a contribution but I'm also concerned about the
amount of time it will take me to make that happen given how new I am
to RoR/Radiant.

Thanks for all the help guys.

On Feb 27, 1:35 pm, William Ross w...@spanner.org wrote:
 On 27 Feb 2011, at 19:16, craayzie wrote:

  If someone could jump in and provide guidance on how to best implement
  sending multiple emails upon form submission that would be huge. I'd
  hate to spend time working on an implementation only to figure out
  afterwards that it wasn't the best approach.

 My advice, for what it's worth, would be to fork the mailer extension, make 
 the very simple changes required to specify several messages in the 'mailer' 
 part, and request that they are pulled.

 best,

 will


[Radiant] Re: send multiple emails with mailer?

2011-02-26 Thread Marc
Umm, far be it for me to express what is the standard / recommended
Radiant Way™. It is still very early days for me and Radiant (not to
mention blowing the dust off my Ruby and Rails knowledge).

I just saw it as a way to achieve multiple behaviour from the one
transaction without forking the code. That said many people do seem to
fork things to get what they want, and push back if they are generous.
The prefix addition would be a natural example of forking rather than
just creating an additional extension, in your case.

I've used mailer for a simple contact form. My cursory look at the
code didn't suggest a clean way to be able to use the one form
submission to generate two separate emails.

Marc

On Feb 25, 8:13 am, craayzie flesh...@gmail.com wrote:
 Thanks for replying Marc. I could definitely go this route .. I'm
 curious though - is there no way to do this w/ Mailer?

 The solution you describe seems like a work-around as opposed to the
 standard/recommended way one would do it. Do I have the wrong
 impression or is this the recommended way of sending multiple emails
 upon form submission w/ Radiant?

 On Feb 22, 3:25 pm, Marc marc.bosc...@gmail.com wrote:



  You could always usehttps://github.com/dirkkelly/radiant-forms-extension
  and create an add-on which uses different page parts to the built in
  form mail add-on to send the other email.

  I'm in the process of creating an add-on to store the form results in
  a table. See radiant-forms-extension/app/models/form_mail.rb for the
  built in add-on

  The trick is that add-ons are called in order expressed in the
  'config' page part.

  eg.

  storing:
    extension: store # my custom add-on, could always dup the form mail
  add-on; see the source
    result: *email_field_references…*
  mailing:
    extension: mail # usual example in documentation
    fields:
      from: person[email]
      to: person[email]
      subject: contact[subject]
      reply_to: person[email]

  Ideally if the built in form mail code was augmented to take an
  optional prefix then multiple instances of the add-on could be used…

  e.g.
  mailing_user:
    extension: mail # uses usual page parts: content, etc.
    fields:
      from: person[email]
      to: person[email]
      subject: contact[subject]
      reply_to: person[email]

  internal_mailer:
    extension: mail
    prefix: 'internal-'  # would use page parts: internal-content, etc.
    from: em...@email.com
    to: em...@email.com
    reply_to: em...@email.com
    fields:
      subject: contact[subject]

  Regards,

  Marc

  On Feb 22, 8:44 am, craayzie flesh...@gmail.com wrote:

   I've installed the mailer extension and it works great! I'd like to
   send a thank you for contacting us email to the form submitter in
   addition to receiving a notification email letting me know that
   they've submitted a form. Unfortunately, I don't see a way to send
   multiple emails with mailer ..

   Thanks for pointing me in the right direction!


[Radiant] Re: send multiple emails with mailer?

2011-02-24 Thread john
you can do it with the mailer extension. in the mailer part try:

subject: multiple recipients example
from_field: email
redirect_to: /
recipients:
  - a...@example.com
  - b...@example.net


[Radiant] Re: send multiple emails with mailer?

2011-02-22 Thread Marc
You could always use https://github.com/dirkkelly/radiant-forms-extension
and create an add-on which uses different page parts to the built in
form mail add-on to send the other email.

I'm in the process of creating an add-on to store the form results in
a table. See radiant-forms-extension/app/models/form_mail.rb for the
built in add-on

The trick is that add-ons are called in order expressed in the
'config' page part.

eg.

storing:
  extension: store # my custom add-on, could always dup the form mail
add-on; see the source
  result: *email_field_references…*
mailing:
  extension: mail # usual example in documentation
  fields:
from: person[email]
to: person[email]
subject: contact[subject]
reply_to: person[email]


Ideally if the built in form mail code was augmented to take an
optional prefix then multiple instances of the add-on could be used…

e.g.
mailing_user:
  extension: mail # uses usual page parts: content, etc.
  fields:
from: person[email]
to: person[email]
subject: contact[subject]
reply_to: person[email]

internal_mailer:
  extension: mail
  prefix: 'internal-'  # would use page parts: internal-content, etc.
  from: em...@email.com
  to: em...@email.com
  reply_to: em...@email.com
  fields:
subject: contact[subject]

Regards,

Marc

On Feb 22, 8:44 am, craayzie flesh...@gmail.com wrote:
 I've installed the mailer extension and it works great! I'd like to
 send a thank you for contacting us email to the form submitter in
 addition to receiving a notification email letting me know that
 they've submitted a form. Unfortunately, I don't see a way to send
 multiple emails with mailer ..

 Thanks for pointing me in the right direction!