I figured it out, I had used an example from http://github.com/benprew/pony
Works locally, doesn't work on heroku
Pony.mail :to => ENV['TO_EMAIL'],
:from => params[:email],
:subject => params[:subject],
:via_options => {
:address => 'smtp.gmail.com',
:port => '587',
:enable_starttls_auto => true,
:user_name => ENV['GMAIL_USER'],
:password => ENV['GMAIL_PASSWORD'],
:authentication => :plain,
# :plain, :login, :cram_md5, no auth by default
:domain => "wavesummit.com" # the HELO
domain provided by the client to the server
}
However after reading http://blog.jpoz.net/2009/09/02/gmail-heroku-sinatra.html
and also cheking out adams page github http://github.com/adamwiggins/pony
This code below worked.
Pony.mail :to => ENV['TO_EMAIL'],
:from => params[:email],
:subject => params[:subject],
:via => :smtp,
:smtp => {
:address => 'smtp.gmail.com',
:port => '587',
:user_name => ENV['GMAIL_USER'],
:password => ENV['GMAIL_PASSWORD'],
:authentication => :plain,
# :plain, :login, :cram_md5, no auth by default
:domain => "wavesummit.com" # the HELO
domain provided by the client to the server
}
Another gotcha is that in order to install pony rubygems needs to be
at least 1.3.6, debian only offers 1.3.5 through apt-get
On Oct 26, 6:04 pm, Jimmy <[email protected]> wrote:
> Pony works locally, but on heroku I get the following:
>
> 2010-10-25 16:07:48 1PAW8q-0006J3-Qr Failed to create spool file /var/
> spool/exim4/input//1PAW8q-0006J3-Qr-D: Permission denied
> 2010-10-25 16:07:48 1PAW8q-0006J3-Qr Failed to create spool file /var/
> spool/exim4/input//1PAW8q-0006J3-Qr-D: Permission denied
> 2010-10-25 16:07:48 1PAW8q-0006J3-Qr Failed to create spool file /var/
> spool/exim4/input//1PAW8q-0006J3-Qr-D: Permission denied
>
> Is there a solution or alternative to sending mail from Sinatra using
> Gmail and Pony?
--
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en.