I am trying to send an e-mail using Pony and get the
NoMethodError at /
undefined method `address' for #Mail::Message:. error. This is my code so far:
post '/' do
Pony.options = { :from => '[email protected]',
:via => :smtp,
:address => 'smtp.yandex.ru',
:port => '465',
:user_name => '___',
:password => '___',
:authentication => :plain,
:domain => "http://127.0.0.1:9393/"
}
Pony.mail(subject: 'Hello', to: "[email protected]", body: 'hi')
redirect '/'
end
when running bundle list it does show pony (1.10). What could go wrong?
:address
,:port
, etc. go inside a:via_options
hash.Per the documentation:
Therefore, you'll want: