hello everyone,
im doing a plugin for redmine1.1.1 using rails 2.3.5 and ruby 1.8.7
im using pony to send emails with pdf reports but im not being able to send not even the simplest email ever.
And here is the error:
Processing ApplicationController#create_pdf (for 192.168.8.221 at 2013-12-03 12:29:56) [GET]
Parameters: {project_id=>proj01-ti, action=>create_pdf, id=>16, controller=>ct_timeclock_report}
SyntaxError (/usr/lib/ruby/gems/1.8/gems/pony-1.6.1/lib/pony.rb:213: odd number list for Hash
content: Base64.encode64(body),
^
/usr/lib/ruby/gems/1.8/gems/pony-1.6.1/lib/pony.rb:213: syntax error, unexpected ':', expecting '}'
content: Base64.encode64(body),
^
/usr/lib/ruby/gems/1.8/gems/pony-1.6.1/lib/pony.rb:213: syntax error, unexpected ',', expecting kEND
/usr/lib/ruby/gems/1.8/gems/pony-1.6.1/lib/pony.rb:215: syntax error, unexpected '}', expecting kEND):
vendor/plugins/redmine_ct/app/controllers/ct_timeclock_report_controller.rb:4
I`ve tried many more options like
Pony.options = {:to => usr.mail, :from => '
nor...@nscad.org.br', :via => :smtp, :via_options => {:address => '
smtp.nscad.org.br',:port => '25', :domain => 'localhost.localdomain'} }
and
Pony.mail({:to => '
gus...@nscad.org.br', :attachments => {"pdfReport" => File.read("tmp/pdfs/" + pdfReport)} })
and
Pony.mail(:to => '
gus...@nscad.org.br',:body => 'bla', :via => :smtp, :via_options => {:address => '
smtp.nscad.org.br',:port => '25',:username => '', :password => '',:domain => 'localhost.localdomain'} )
and none of them worked, the errors were similar, like i was`nt specifying the correct variables for mail ...
anyone know why im getting this error ? can anyone give me a simple mail example that should work ?
THANKS!