isomorfeus-mailer 1.0.0.zeta16 → 1.0.0.zeta17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -1
- data/lib/isomorfeus/mailer/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52d9bd4e04bd1cdc98d6f4e554c60157d8e957696c893b3ad7c1d1ae270e04c4
|
4
|
+
data.tar.gz: '093267ef78db9fbe97e3e615d9504cd6c1d88ff005da48c8177539e300d4db20'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c97e10fa49fd702df741a53dd47e2056af9b989e141c6f2d76367626e57fc042d64abd0b6c252498b70dcf675cb49fc4625ef3714104a505402be7f4c30ffa
|
7
|
+
data.tar.gz: 0f3161bce4725cb4473f0cc7c4c8e3ecac7e281d3dd9b71102a5f2b211bbd2cdb52215f3644481751eafdd521ca3630fffac721698f9ddd8e30601ac7d438b1d
|
data/README.md
CHANGED
@@ -16,11 +16,14 @@ All configuration options of Mailhandler can be passed in the hash. For Mailhand
|
|
16
16
|
|
17
17
|
### Usage
|
18
18
|
|
19
|
+
#### Mail Components
|
19
20
|
Within a isomorfeus project components for building emails are the app/mail_components directory.
|
20
21
|
When using LucidComponent or LucidMaterial::Component the main component passed to the mail must be either a LucidApp or LucidMaterial::App component.
|
21
22
|
Each mail template build of components can be considered a tiny App.
|
22
23
|
|
23
|
-
|
24
|
+
Mail components are rendered using the React static renderer, so the React rules for static rendering apply.
|
25
|
+
|
26
|
+
Inline styles work in Mail Components too.
|
24
27
|
|
25
28
|
Example component:
|
26
29
|
```ruby
|
@@ -36,6 +39,10 @@ class EmailComponent < LucidApp::Base
|
|
36
39
|
end
|
37
40
|
```
|
38
41
|
|
42
|
+
#### Sending Mail
|
43
|
+
|
44
|
+
One class is provided to actually build and send the mail: LucidMail. This class is only available on the server.
|
45
|
+
|
39
46
|
Sending mail with the rendered component:
|
40
47
|
```ruby
|
41
48
|
mail = LucidMail.new(component: 'EmailComponent',
|
@@ -45,6 +52,22 @@ mail = LucidMail.new(component: 'EmailComponent',
|
|
45
52
|
subject: 'Welcome')
|
46
53
|
mail.send
|
47
54
|
```
|
55
|
+
#### Inspecting the rendered component
|
56
|
+
|
57
|
+
The generated HTML is accessible after building the mail using:
|
58
|
+
```ruby
|
59
|
+
mail.build
|
60
|
+
html = mail.rendered_component
|
61
|
+
```
|
62
|
+
|
63
|
+
#### Accessing the mail before sending
|
64
|
+
|
65
|
+
It is possible to access the actual mail object after building it for further inspection or modification:
|
66
|
+
```ruby
|
67
|
+
mail.build
|
68
|
+
mail_object = mail.mail
|
69
|
+
```
|
70
|
+
For documentation about the Mail Object see the [Mail Documentation](https://github.com/mikel/mail).
|
48
71
|
|
49
72
|
#### Triggering mail from a client
|
50
73
|
LucidMail is available only on the server. It can be wrapped in a operation to allow triggering the sending of mail from a client. Example:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.zeta17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 16.12.
|
103
|
+
version: 16.12.18
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 16.12.
|
110
|
+
version: 16.12.18
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: isomorfeus-redux
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.0.0.
|
131
|
+
version: 1.0.0.zeta17
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.0.0.
|
138
|
+
version: 1.0.0.zeta17
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: opal-webpack-loader
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|