You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,9 @@ The Parse Server API Mail Adapter enables Parse Server to send emails using any
18
18
-[Placeholders](#placeholders)
19
19
-[Password Reset and Email Verification](#password-reset-and-email-verification)
20
20
-[Localization](#localization)
21
+
-[Cloud Code](#cloud-code)
22
+
-[Example](#example)
23
+
-[Parameters](#parameters)
21
24
-[Need help?](#need-help)
22
25
23
26
# Installation
@@ -48,7 +51,7 @@ You can modify the script to use any other API you like or debug-step through th
48
51
49
52
# Configuration
50
53
51
-
An example configuation to add the API Mail Adapter to Parse Server could look like this:
54
+
An example configuration to add the API Mail Adapter to Parse Server could look like this:
52
55
53
56
```js
54
57
// Declare a mail client
@@ -188,6 +191,38 @@ Files are matched with the user locale in the following order:
188
191
2.**Language** (locale `de-AT` matches file in folder `de` if there is no file in folder `de-AT`)
189
192
3.**Default** (default file in base folder is returned if there is no file in folders `de-AT` and `de`)
190
193
194
+
# Cloud Code
195
+
196
+
Sending an email directly from Cloud Code is possible since Parse Server > 4.5.0. This adapter supports this convenience method.
197
+
198
+
## Example
199
+
200
+
If the `user` provided has an email address set, it is not necessary to set a `recipient` because the mail adapter will by default use the mail address of the `user`.
201
+
202
+
```js
203
+
Parse.Cloud.sendEmail({
204
+
templateName:"next_level_email",
205
+
placeholders: { gameScore:100, nextLevel:2 },
206
+
user: parseUser // user with email address
207
+
});
208
+
```
209
+
210
+
## Parameters
211
+
212
+
| Parameter | Type | Optional | Default Value | Example Value | Description |
0 commit comments