New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sendgrid_notification

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sendgrid_notification

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

SendgridNotification

SendgridNotification is engine of Ruby on Rails, and notification mail (e.g. account registration, logging in by new devise, reminder, etc...) sender and utility, using SendGrid API.

This provides mail utility models, migrations, and rake tasks.

Installation / Usage

First, add sendgird_notification in Gemfile

gem 'sendgrid_notification'
bundle install

Then, generate migration files and migrate

bin/rails sendgrid_notification_engine:install:migrations
bin/rails db:migrate

Generate and edit controllers for NotificationMail CRUD

...

Create NotificationMail record. key = 'example'

...

And send the mail

...

Oops. It lacks SendGrid API configuration. Get API key from sendgrid.com and set it ENV['SENDGRID_API_KEY']

...

Make subclasses for each notification_mail key

...

Validate mail template has right parameter name

...

Configuration

NameDescriptionDefault Value
config.sendgrid_notification.api_keySendGrid API KeyENV['SENDGRID_API_KEY']
config.sendgrid_notification.mail_fromFROM address of notification mailENV['SENDGRID_MAIL_FROM']
config.sendgrid_notification.mail_from_nameFROM name of notification mailENV['SENDGRID_MAIL_FROM_NAME']
config.sendgrid_notification.mailerMailer class name (by string). usually no need to change"SendgridNotification::SendgridMailer"

Rake tasks

TaskDescriptionENV/Parameter
sendgrid_notification:sendSend mailTO=[recipient email address] KEY=[mail type key] ... and mail parameters
sendgrid_notification:status:autoupdateUpdate status from previous autoupdate task
sendgrid_notification:status:retrieveOnly retrieve suppression statuses in start..endstart=[datetime] end=[datetime]
sendgrid_notification:status:updateRetrieve suppression status and update recordstart=[datetime] end=[datetime]
sendgrid_notification:testmail:initCreate notification_mails test record. default key = "_test"
sendgrid_notification:testmail:sendSend testmailTO=[recipient email address] [body=body]

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 27 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc