Re: [Radiant] Re: Mailer Extension, Mail gem, and AWS-SES

2012-04-26 Thread Jim Gay
Thanks for tackling this.
The mailer extension is one of the oldest and had the most cooks in the kitchen.
At one point (don't know if that's still true) it defined the "send"
method, which caused me all kinds of frustration.

On Tue, Apr 24, 2012 at 8:14 PM, Jordon Bedwell  wrote:
> Technically it lies about it's dependencies as if it's working with
> Rails 3 which does have mail gem as a dependency.  Anyway the
> problematic line is
> https://github.com/radiant/radiant-mailer-extension/blob/master/app/controllers/mail_controller.rb#L11
> which passes in a few options that aren't required anymore,  the
> current method for mail gem is to flatten and turn them into mail
> fields.  I've never  really worked with the older mail gem but it
> looks the way you are doing it is passing configs, fields and a
> mailer.  This is no longer the preferred method.
>
> Firing up my trusty Pry console: (cheatery inc, it's also cut)
> [2] pry(main)> show-doc Mail.new
>
> From: 
> /home/jordon/development/test1/test1/ruby/1.9.1/gems/mail-2.4.4/lib/mail/mail.rb
> @ line 49:
> Number of lines: 45
> Owner: #
> Visibility: public
> Signature: new(*args, &block)
>
>  message = Mail.new({
>  :to => 'mi...@test.lindsaar.net',
>  'from' => 'b...@test.lindsaar.net',
>  :subject => 'This is an email',
>  :body => 'This is the body'
> })
>
> Tracing it back to here
> https://github.com/mikel/mail/blob/master/lib/mail/message.rb#L100 you
> notice that now with the latest gem you are doing it all wrong.
> Shouldn't be too hard to fix, I'll see what I can later tonight and
> send up a pull request to fix it once I look at the full source of the
> mailer extension and see what exactly it's doing and why it's doing
> it.
>
> On Tue, Apr 24, 2012 at 5:03 PM, john  wrote:
>> i don't think the mailer extension has any external dependencies. do you
>> mean something in the mailer extension conflicts with your using the mail
>> gem for some other purpose?
>>
>>
>> On Tuesday, April 24, 2012 10:49:49 AM UTC-5, AJ Siegel wrote:
>>>
>>> It seems like the Mailer extension is only compatible with versions of
>>> the Mail gem <2.0. Specifically, I think after 2.0 Mail gem removed
>>> the valid_config? method and there are a few other issues.
>>>
>>> This is preventing me from successfully implementing AWS-SES gem
>>> because it is only compatible with Mail > 2.0
>>>
>>> Is anyone working on the mailer extension to make it compatible with
>>> 2.0 and greater?



-- 
Write intention revealing code #=> http://www.clean-ruby.com

Jim Gay
Saturn Flyer LLC
571-403-0338


Re: [Radiant] Re: Mailer Extension, Mail gem, and AWS-SES

2012-04-26 Thread Jordon Bedwell
Technically it lies about it's dependencies as if it's working with
Rails 3 which does have mail gem as a dependency.  Anyway the
problematic line is
https://github.com/radiant/radiant-mailer-extension/blob/master/app/controllers/mail_controller.rb#L11
which passes in a few options that aren't required anymore,  the
current method for mail gem is to flatten and turn them into mail
fields.  I've never  really worked with the older mail gem but it
looks the way you are doing it is passing configs, fields and a
mailer.  This is no longer the preferred method.

Firing up my trusty Pry console: (cheatery inc, it's also cut)
[2] pry(main)> show-doc Mail.new

From: 
/home/jordon/development/test1/test1/ruby/1.9.1/gems/mail-2.4.4/lib/mail/mail.rb
@ line 49:
Number of lines: 45
Owner: #
Visibility: public
Signature: new(*args, &block)

 message = Mail.new({
  :to => 'mi...@test.lindsaar.net',
  'from' => 'b...@test.lindsaar.net',
  :subject => 'This is an email',
  :body => 'This is the body'
})

Tracing it back to here
https://github.com/mikel/mail/blob/master/lib/mail/message.rb#L100 you
notice that now with the latest gem you are doing it all wrong.
Shouldn't be too hard to fix, I'll see what I can later tonight and
send up a pull request to fix it once I look at the full source of the
mailer extension and see what exactly it's doing and why it's doing
it.

On Tue, Apr 24, 2012 at 5:03 PM, john  wrote:
> i don't think the mailer extension has any external dependencies. do you
> mean something in the mailer extension conflicts with your using the mail
> gem for some other purpose?
>
>
> On Tuesday, April 24, 2012 10:49:49 AM UTC-5, AJ Siegel wrote:
>>
>> It seems like the Mailer extension is only compatible with versions of
>> the Mail gem <2.0. Specifically, I think after 2.0 Mail gem removed
>> the valid_config? method and there are a few other issues.
>>
>> This is preventing me from successfully implementing AWS-SES gem
>> because it is only compatible with Mail > 2.0
>>
>> Is anyone working on the mailer extension to make it compatible with
>> 2.0 and greater?


Re: [Radiant] Re: Mailer Extension, Mail gem, and AWS-SES

2012-04-26 Thread Jordon Bedwell
I actually take that back, I responded way to fast, it looks like it
doesn't have a dependency it defines it in the model for some /very
odd/ reason instead of as a helper or lib so I missed it entirely
since I did not see that kind of logic coming.  Anyways if he is using
the Mail gem with this gem there will be a conflict anyways
considering Radiant defines Mail so it's not gonna work with Mail at
all.  The rest of it is true though, the problematic line and and all.

On Tue, Apr 24, 2012 at 5:03 PM, john  wrote:
> i don't think the mailer extension has any external dependencies. do you
> mean something in the mailer extension conflicts with your using the mail
> gem for some other purpose?
>
>
> On Tuesday, April 24, 2012 10:49:49 AM UTC-5, AJ Siegel wrote:
>>
>> It seems like the Mailer extension is only compatible with versions of
>> the Mail gem <2.0. Specifically, I think after 2.0 Mail gem removed
>> the valid_config? method and there are a few other issues.
>>
>> This is preventing me from successfully implementing AWS-SES gem
>> because it is only compatible with Mail > 2.0
>>
>> Is anyone working on the mailer extension to make it compatible with
>> 2.0 and greater?


[Radiant] Re: Mailer Extension, Mail gem, and AWS-SES

2012-04-25 Thread AJ Siegel
John,

I will take a stab documenting some of the challenges I am
encountering.

On Apr 24, 3:03 pm, john  wrote:
> i don't think the mailer extension has any external dependencies. do you
> mean something in the mailer extension conflicts with your using the mail
> gem for some other purpose?
>
>
>
>
>
>
>
> On Tuesday, April 24, 2012 10:49:49 AM UTC-5, AJ Siegel wrote:
>
> > It seems like the Mailer extension is only compatible with versions of
> > the Mail gem <2.0. Specifically, I think after 2.0 Mail gem removed
> > the valid_config? method and there are a few other issues.
>
> > This is preventing me from successfully implementing AWS-SES gem
> > because it is only compatible with Mail > 2.0
>
> > Is anyone working on the mailer extension to make it compatible with
> > 2.0 and greater?


[Radiant] Re: Mailer Extension, Mail gem, and AWS-SES

2012-04-24 Thread john
i don't think the mailer extension has any external dependencies. do you 
mean something in the mailer extension conflicts with your using the mail 
gem for some other purpose?

On Tuesday, April 24, 2012 10:49:49 AM UTC-5, AJ Siegel wrote:
>
> It seems like the Mailer extension is only compatible with versions of 
> the Mail gem <2.0. Specifically, I think after 2.0 Mail gem removed 
> the valid_config? method and there are a few other issues. 
>
> This is preventing me from successfully implementing AWS-SES gem 
> because it is only compatible with Mail > 2.0 
>
> Is anyone working on the mailer extension to make it compatible with 
> 2.0 and greater?