Huguito:

- Probá de agregar esta opcion tls, este codigo me funcionó con gmail cuando
lo usé:
ActionMailer::Base.smtp_settings = {
  :tls => true,
  :address => "smtp.gmail.com",
  :port => "587", #465
  :domain => "gmail.com", # supports custom domains on gmail
  :authentication => :plain,
  :user_name =>  "[email protected]",
  :password => "claveclave"
}

- No olvides comentar en config/environments/development.rb
config.action_mailer.raise_delivery_errors = false
Si está en false no te avisa cuando hay errores, malo malo.

s2


On Sun, Nov 22, 2009 at 12:07 PM, Hugo Massaroli
<[email protected]>wrote:

> Hola gente! Alguno usó ya ActionMailer con Gmail? Estoy lidiando con un
> error que me cuesta superar:
>
> Net::SMTPAuthenticationError: 530 5.7.0 Must issue a STARTTLS command
> first. 36sm1495857yxh.67
>
> Estoy probando un unit test con esta configuración:
>
> En *environment/test.rb*:
>
> config.action_mailer.perform_deliveries = true
> config.action_mailer.delivery_method = :smtp
> config.action_mailer.raise_delivery_errors = true
> config.action_mailer.smtp_settings = {
>    :address => "smtp.gmail.com",
>    :port => 587,
>    :domain => "<myuser>@gmail.com",
>    :authentication => :plain,
>    :user_name => "<myuser>",
>    :password => "<mypass>",
>    :enable_starttls_auto => true
> }
>
> Tengo una clase *Notifier* con el siguiente código:
>
>   def activation_instructions(user)
>     subject       "Activation Instructions"
>     from          "Binary Logic Notifier <[email protected]>"
>     recipients    user.email
>     sent_on       Time.now
>     #body          :account_activation_url =>
> register_url(user.perishable_token)
>     body "Mail loco"
>   end
>
> Y esta es mi *unit test*:
>
> class NotifierTest < ActiveSupport::TestCase
>   def test_notifier
>     user = User.new
>     user.email= "<destinatario>@gmail.com"
>     Notifier.deliver_activation_instructions(user)
>   end
> end
>
> Creo que no hay error con los datos de cuentas, y supongo que el error está
> en la configuración relacionada con Gmail y ese TLS.
>
> _______________________________________________
> Ruby mailing list
> [email protected]
> http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar
>
>


-- 
Leonardo Gallucci
Developer at Delapalo Labs
http://twitter.com/leonardog (@leonardog)
http://delicious.com/leonardogallucci
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a