sendCustomMail 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/email.html.erb +13 -0
- data/lib/email.text.erb +6 -0
- data/lib/sendCustomMail.rb +23 -0
- data/lib/userMailer.rb +9 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 53a20947fa52e9abf4f1d5d178b2e447f749e5efd530f9e16f22e3ffa7c04127
|
4
|
+
data.tar.gz: 5de9760c251acfcee4811adfe4c1c3362295258b56eccadd257280b241c0d5a2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 02cfa990e155be93c677ce6240879d05405c5aba7329ce4a6951ebf32e03ee4d26535f12245c5957daa77c0556edebde190133f7bbe392a8f65d66dc4b63f571
|
7
|
+
data.tar.gz: 9f829a314ea1f5bca71e6c223d8e0c2ce3c194bcf020fc939e39ae90138cc81b9ab5765abb094efe941d8fb8920346702ce18918ab1af595843b92d1aaefb670
|
data/lib/email.html.erb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
|
5
|
+
</head>
|
6
|
+
<body>
|
7
|
+
<h1>Welcome to EventGenie, <%= @user_email %></h1>
|
8
|
+
<p>
|
9
|
+
<%= @message %><br>
|
10
|
+
</p>
|
11
|
+
<p>Thanks and have a great day!</p>
|
12
|
+
</body>
|
13
|
+
</html>
|
data/lib/email.text.erb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'userMailer'
|
2
|
+
|
3
|
+
class SendCustomMail < UserMailer
|
4
|
+
attr_reader :user_email, :action_type
|
5
|
+
|
6
|
+
def initialize(user_email, action_type)
|
7
|
+
@user_email = user_email
|
8
|
+
@action_type = action_type
|
9
|
+
end
|
10
|
+
|
11
|
+
def process
|
12
|
+
if @action_type == "PROFILE"
|
13
|
+
@message = "Profile updated successfully."
|
14
|
+
end
|
15
|
+
|
16
|
+
if @action_type == "ORDER"
|
17
|
+
@message = "Order placed successfully."
|
18
|
+
end
|
19
|
+
|
20
|
+
UserMailer.new.send_email(@user_email, @message)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/lib/userMailer.rb
ADDED
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sendCustomMail
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Priyesh Shah
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-15 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Send customized email with a message
|
14
|
+
email: shahpriyesh2005@yahoo.co.in
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/email.html.erb
|
20
|
+
- lib/email.text.erb
|
21
|
+
- lib/sendCustomMail.rb
|
22
|
+
- lib/userMailer.rb
|
23
|
+
homepage: http://rubygems.org/gems/sendCustomMail
|
24
|
+
licenses: []
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubygems_version: 3.0.3
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: Send customized email
|
45
|
+
test_files: []
|