Hello All,
I am trying to use Mandrill api in my rails app.
I am getting this error every time:-
Net::SMTPServerBusy (401 4.1.7 Bad sender address syntax)
I am using Ruby - 1.9.3, rails - 3.2.8, Thin server, & Ubuntu 12.10.
in Gemfile:-
gem “mandrill-api”, “~> 1.0.45”
gem ‘mandrill_mailer’
application.rb:-
config.action_mailer.default_url_options = { :host => ‘localhost:3000’ }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => “smtp.mandrillapp.com”,
:port => 587,
:user_name => ENV[“some email”],
:password => ENV[“api key”],
:authentication => ‘login’
}
In mailer.rb:-
def verify_code(user)
mail(:to => user.email, :subject => “TEXT”) do |format|
format.html
end
end
In controller:-
UserMailer.verify_code(resource).deliver # Here resource is the user
object
What am I doing wrong here?
Thanks,
Avinash