@bigbinary/neeto-email-delivery-frontend 1.0.11 → 1.0.12
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.
- package/README.md +77 -6
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -64,13 +64,18 @@ class ApplicationMailer < NeetoCommonsBackend::ApplicationMailer
|
|
|
64
64
|
# ...
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
6. Include NeetoEmailDeliveryEngine::HasEmailIntegrations in the host's owner model
|
|
67
|
+
6. Include NeetoEmailDeliveryEngine::HasEmailIntegrations in the host's owner model and override the `email_delivery_redirect_url` method
|
|
68
68
|
|
|
69
69
|
```diff
|
|
70
70
|
class Form < ApplicationRecord
|
|
71
71
|
# ...
|
|
72
72
|
+ include NeetoEmailDeliveryEngine::HasEmailIntegrations
|
|
73
73
|
# ...
|
|
74
|
+
|
|
75
|
+
def email_delivery_redirect_url
|
|
76
|
+
# "/admin/..."
|
|
77
|
+
end
|
|
78
|
+
|
|
74
79
|
end
|
|
75
80
|
````
|
|
76
81
|
|
|
@@ -81,7 +86,58 @@ end
|
|
|
81
86
|
NeetoEmailDeliveryEngine.owner_class = "Form"
|
|
82
87
|
```
|
|
83
88
|
|
|
84
|
-
8.
|
|
89
|
+
8. Override the `load_owner` private method by adding the following files.
|
|
90
|
+
|
|
91
|
+
- app/overrides/controllers/neeto_email_delivery_engine/integrations/sparkpost_domains_controller_override.rb
|
|
92
|
+
- app/overrides/controllers/neeto_email_delivery_engine/gmail_controller_override.rb
|
|
93
|
+
- app/overrides/controllers/neeto_email_delivery_engine/outlook_controller_override.rb
|
|
94
|
+
|
|
95
|
+
Example:
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
NeetoEmailDeliveryEngine::Api::V1::GmailController.class_eval do
|
|
99
|
+
|
|
100
|
+
private
|
|
101
|
+
def load_owner
|
|
102
|
+
# @owner = current_user
|
|
103
|
+
# OR
|
|
104
|
+
# @owner = @organization.forms.find(params[:owner_id])
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
9. Override the `send_disconnection_email` private method -
|
|
110
|
+
|
|
111
|
+
- app/overrides/services/neeto_email_delivery_engine/gmail/send_email_service_override.rb
|
|
112
|
+
- app/overrides/services/neeto_email_delivery_engine/outlook/send_email_service_override.rb
|
|
113
|
+
|
|
114
|
+
Example:
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
NeetoEmailDeliveryEngine::Gmail::SendEmailService.class_eval do
|
|
118
|
+
|
|
119
|
+
private
|
|
120
|
+
|
|
121
|
+
def send_disconnection_email
|
|
122
|
+
organization = @gmail_account.organization
|
|
123
|
+
# DisconnectionMailer
|
|
124
|
+
# .with(organization_id: organization.id)
|
|
125
|
+
# .send_email(user: @gmail_account.integrable, type: "gmail")
|
|
126
|
+
# .deliver_later
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
10. Add mailgun ingress config in application.rb
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
config.action_mailbox.ingress = :mailgun
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
11. Add `:gmail` and `:outlook` to omniauth_providers in
|
|
138
|
+
config/initializers/extend_user_omniauth.rb.
|
|
139
|
+
|
|
140
|
+
12. The following env variables need to be added to the host application.
|
|
85
141
|
|
|
86
142
|
```
|
|
87
143
|
GOOGLE_OAUTH_CLIENT_ID
|
|
@@ -97,10 +153,25 @@ CONNECT_PUBLIC_KEY
|
|
|
97
153
|
MAILGUN_INGRESS_SIGNING_KEY (needed for our custom logic to verify the Outlook account.)
|
|
98
154
|
```
|
|
99
155
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
156
|
+
13. In secrets.yml add
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
sparkpost:
|
|
160
|
+
sending_domains_key: <%= ENV['SPARKPOST_SENDING_DOMAINS_KEY'] %>
|
|
161
|
+
sending_domains_user_name: SMTP_Injection
|
|
162
|
+
sending_domains_address: smtp.sparkpostmail.com
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
14. Ensure that the domain `<app-name>email.com` (production) and
|
|
166
|
+
`<app-name>email.net` (staging) is correctly setup in Mailgun to accept
|
|
167
|
+
incoming emails. Example: For NeetoForm it would be neetoformemail.com
|
|
168
|
+
(production) and neetoformemail.net (staging).
|
|
169
|
+
|
|
170
|
+
15. Add the following to ApplicationMailbox
|
|
171
|
+
|
|
172
|
+
```ruby
|
|
173
|
+
routing /neetoemaildelivery/i => "neeto_email_delivery_engine/inbound"
|
|
174
|
+
```
|
|
104
175
|
|
|
105
176
|
### Frontend package
|
|
106
177
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-email-delivery-frontend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "This repo is for implementing custom email delivery functionality for the Neeto platform.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-email-delivery-nano",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
71
71
|
"@bigbinary/neeto-commons-frontend": "4.13.91",
|
|
72
72
|
"@bigbinary/neeto-filters-frontend": "4.3.28",
|
|
73
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
74
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
73
|
+
"@bigbinary/neeto-icons": "1.20.71",
|
|
74
|
+
"@bigbinary/neeto-molecules": "4.0.126",
|
|
75
75
|
"@bigbinary/neetoui": "8.3.50",
|
|
76
76
|
"@emotion/is-prop-valid": "1.2.0",
|
|
77
77
|
"@faker-js/faker": "8.2.0",
|
|
@@ -180,8 +180,8 @@
|
|
|
180
180
|
"@bigbinary/neeto-cist": "1.0.17",
|
|
181
181
|
"@bigbinary/neeto-commons-frontend": "4.13.91",
|
|
182
182
|
"@bigbinary/neeto-filters-frontend": "4.3.28",
|
|
183
|
-
"@bigbinary/neeto-icons": "1.20.
|
|
184
|
-
"@bigbinary/neeto-molecules": "4.0.
|
|
183
|
+
"@bigbinary/neeto-icons": "1.20.71",
|
|
184
|
+
"@bigbinary/neeto-molecules": "4.0.126",
|
|
185
185
|
"@bigbinary/neetoui": "8.3.50",
|
|
186
186
|
"@honeybadger-io/js": "6.10.1",
|
|
187
187
|
"@honeybadger-io/react": "6.1.25",
|