dimanche 26 juillet 2015

Amazon AWS send email form RoR

Am trying to send email from my RoR application using a remote smtp host. This is working from my local server in both production and development.

when i set

config.action_mailer.raise_delivery_errors

to true i get this error in the log

Error during failsafe response: 550-sender IP address xx.xx.xxx.xxx is part of Amazon AWS, and may not use this
/usr/local/lib/ruby/2.2.0/net/smtp.rb:964:in `check_response'
/usr/local/lib/ruby/2.2.0/net/smtp.rb:933:in `getok'
/usr/local/lib/ruby/2.2.0/net/smtp.rb:869:in `rcptto'
/usr/local/lib/ruby/2.2.0/net/smtp.rb:850:in `block in rcptto_list'
/usr/local/lib/ruby/2.2.0/net/smtp.rb:848:in `each'
/usr/local/lib/ruby/2.2.0/net/smtp.rb:848:in `rcptto_list'

This is my settings for action mailer

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:              "smtp.thehostname.com",
  port:                 587,
  domain:               'MyDomain.net',
  user_name:            'MyUsername',
  password:             'MyPassword',
  authentication:       'plain',
  enable_starttls_auto: true  
}

and i have set this settings in my production environment

config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { :host => "subdomain.mydomain.net" }

Does anyone know why I'm not able to send mail from amazon AWS?




Aucun commentaire:

Enregistrer un commentaire