Showing posts with label heroku. Show all posts
Showing posts with label heroku. Show all posts

Thursday, October 27, 2011

Sending email using pony gem via sendgrid under heroku

Pony.mail(:to => params[:to],
:from => params[:name] + "",
:subject => params[:subject],
:body => params[:body],
:port => '587',
:via => :smtp,
:via_options => {
:address => 'smtp.sendgrid.net',
:port => '587',
:enable_starttls_auto => true,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:authentication => :plain,
:domain => ENV['SENDGRID_DOMAIN']
})

How to get source code from Heroku

ca@osm-mnl-ca-lx:~/Projects/Rubys$ git clone git@heroku.com:your-app.git
Cloning into your-app...
The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,50.19.85.156' (RSA) to the list of known hosts.
remote: Counting objects: 73, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 73 (delta 24), reused 0 (delta 0)
Receiving objects: 100% (73/73), 15.48 KiB, done.
Resolving deltas: 100% (24/24), done.

Adding ssh key to Heroku

ca@osm-mnl-ca-lx:~$ heroku keys:add
Enter your Heroku credentials.
Email: biboyatienza@gmail.com
Password:
Found existing public key: /home/ca/.ssh/id_rsa.pub
Uploading ssh public key /home/ca/.ssh/id_rsa.pub