An open API service indexing awesome lists of open source software.

https://github.com/gr1d99/notifications_app

This is the demo app for the medium post that I made (https://medium.com/@giddykim/sending-emails-in-rails-with-sucker-punch-gem-part-1-76b501ad943f)
https://github.com/gr1d99/notifications_app

asynchronous-tasks background-jobs learning-by-doing rails rails-api

Last synced: 11 months ago
JSON representation

This is the demo app for the medium post that I made (https://medium.com/@giddykim/sending-emails-in-rails-with-sucker-punch-gem-part-1-76b501ad943f)

Awesome Lists containing this project

README

          

# README

## Setup
1. Clone app
2. run `bundle install`
3. run `rake db:create`
4. open `application.rb` and update smtp_settings config
```ruby
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
user_name: '',
password: '',
authentication: 'plain',
enable_starttls_auto: true }
```
Replace `` with your Gmail account address

Replace `` with the password of the email you specified above.
5. Open `app/mailers/application_mailer.rb` and replace `'from@example.com'`with the email address you specified in **step 4**
6. Start server `rails s`
7. Send email notifications by making a post request to `http://localhost:3000/notifications`
```json
{
"notification": {
"content": "hello world",
"recipients": ["your-email@gmail.com"]
}
}
```