0

Im running this on heroku. I have verified the domain with sparkpost. It says ready to send. I changed The real url to "example".

mailers/order_mailer.rb

class OrderMailer < ActionMailer::Base
  default from: "orders@example.com"

  def new_order(order)
    @order = order
    mail(to: @order.user.email, subject: 'Order Created!')
  end
end

config/environments/production.rb

config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
    address:        ENV['SPARKPOST_SMTP_HOST'],
    port:           ENV['SPARKPOST_SMTP_PORT'],
    user_name:      ENV['SPARKPOST_SMTP_USERNAME'],
    password:       ENV['SPARKPOST_SMTP_PASSWORD'],
    domain:         'example.com',
    authentication: :plain
  }
  config.action_mailer.default_url_options = {
    :host => 'example.com'
  }

error

2018-10-10T02:01:02.371812+00:00 app[web.1]: [3054201e-f06a-4acd-bff8-58947353fb72] Net::SMTPFatalError (550 5.7.1 Unconfigured Sending Domain <example.com>

I cant think of anything else, but if you need anything let me know.

DhatchXIX
  • 437
  • 1
  • 3
  • 17
  • Did you substitute `` in the error message or that's what it's coming from sparkpost? Also is `<>` coming from sparkpost side? If all of these are correct, are you running app in production mode?? – HungryCoder Oct 10 '18 at 02:40
  • @HungryCoder yes I substituted that as well. I think the <> is coming from SP because I can’t find that anywhere in my code. Yes I am running in production – DhatchXIX Oct 10 '18 at 02:53
  • i can't think of any other reason. i would suggest to contact support. – HungryCoder Oct 10 '18 at 19:06

0 Answers0