🚀 DAY 4 OF LAUNCH WEEK: Introducing GitHub Actions Scanning Support.Learn more →
Socket
Book a DemoInstallSign in
Socket

visit_widget_email

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

visit_widget_email

bundlerRubygems
Version
0.7.14
Version published
Maintainers
1
Created
Source

VisitWidgetMailer

Short description and motivation.

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem 'visit_widget_email'

And then execute:

$ bundle

Or install it yourself as:

$ gem install visit_widget_email

Usage

Command and Query

VisitWidgetEmail::Commands::SendEmail is the command used to send emails anywhere in the app. The constructor takes these params:

mailer_class_name, mailer_action, client_id, params

Where params are the custom parameters for that particular mailer.

For the command to work, you'll need to implement the VisitWidgetEmail::Queries::GetEmailParamsFromClient class. This query should have an execute method that takes in the client id and returns a VisitWidgetEmail::EmailParams object with these attributes set:

  • primary_color
  • host
  • logo_url
  • client_name
  • enable_email_links
  • ios_itunes_app_id
  • android_bundle_identifier

Mailers

You'll want to have your ApplicationMailer inherit from VisitWidgetEmail::Mailer:

class ApplicationMailer < VisitWidgetEmail::Mailer
end

Your mailer methods should have email_params as the first parameter.

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 14 Nov 2023

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