Unable to implement sending Emails with Pony

102 views
Skip to first unread message

Sam D.

unread,
Aug 12, 2013, 12:12:08 PM8/12/13
to pon...@googlegroups.com
Hi Ben,

I just came to know about sending email in 1 line using Pony gem. I tried implementing it in the following way but not yet able to.

describe 'test example' do
  it 'sends email'
   Pony.mail(:to => 'thisisbeautiful..@gmail.com', :from => 'thisisbeautiful..@gmail.com', :via -> sendmail, :subject => 'hi', :body => 'hello world')
  end
end

I'm using RubyMine with Ruby (2.0.0 p247) and RSpec (2.14.1) on my Mac OSX Mountain Lion.

I even tried using :via => smtp, but my test failed giving "Errno::ECONNREFUSED: Connection refused - connect(2)"

Can you please guide if I am missing any steps or settings to be configured before using Pony?

Thanks
Sam
Reply all
Reply to author
Forward
0 new messages