E-mail de confirmação do dispositivo no rails3 usando o gmail não chegando
Eu configurei o seguinte.
----------------------
config/environments/development.rb
----------------------
29 ActionMailer::Base.delivery_method = :smtp
30 ActionMailer::Base.perform_deliveries = true
31 ActionMailer::Base.raise_delivery_errors = true
32
33 ActionMailer::Base.smtp_settings = {
34 :enable_starttls_auto => true, #this is the important stuff!
35 :address => 'smtp.gmail.com',
36 :port => 587,
37 :domain => 'foo.com',
38 :authentication => :plain,
39 :user_name => '[email protected]',
40 :password => '---'
41 }
No entanto, quando o devise envia o email de confirmação, a webbrick imprime o email no log sem nenhum erro, mas o email não acaba na minha caixa de entrada ou na caixa de spam.
Alguma ideia?
EDITAR:
I now get
Net::SMTPAuthenticationError (530 5.7.0 Must issue a STARTTLS command first. x13sm2646038bki.0
):
eu achei aquilo
----------------------
config/environments/development.rb
----------------------
17 # Don't care if the mailer can't send
18 config.action_mailer.raise_delivery_errors = false
Foi configurado mais alto no arquivo de configuração. No entanto, o que é isso sobre a emissão de um comando STARTTLS?
SOLUÇÃO:
----------------------
config/environments/development.rb
----------------------
26 require 'tlsmail' #key but not always described
27 Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
28
29 ActionMailer::Base.delivery_method = :smtp
30 ActionMailer::Base.perform_deliveries = true
31 ActionMailer::Base.raise_delivery_errors = true
32
33 ActionMailer::Base.smtp_settings = {
34 :enable_starttls_auto => true, #this is the important stuff!
35 :address => 'smtp.gmail.com',
36 :port => 587,
37 :domain => 'xtargets.com',
38 :authentication => :plain,
39 :user_name => '-------',
40 :password => '-------'
41 }
42
Brad