@easybits.cloud/mailmask 0.1.2 → 0.1.4
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 +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,16 +15,18 @@ import { MailMask } from "@easybits.cloud/mailmask";
|
|
|
15
15
|
|
|
16
16
|
const mm = new MailMask({ apiKey: "mm_live_..." });
|
|
17
17
|
|
|
18
|
+
// Get your domains
|
|
19
|
+
const domains = await mm.domains.list();
|
|
20
|
+
const domainId = domains[0].id;
|
|
21
|
+
|
|
18
22
|
// Create an alias — emails to hello@yourdomain.com forward to your inbox
|
|
19
|
-
const alias = await mm.aliases.create({
|
|
20
|
-
domainId: "domain-id",
|
|
23
|
+
const alias = await mm.aliases.create(domainId, {
|
|
21
24
|
local: "hello",
|
|
22
25
|
destinations: ["you@example.com"],
|
|
23
26
|
});
|
|
24
27
|
|
|
25
28
|
// Send an email (routed through MailMask for high deliverability)
|
|
26
|
-
await mm.
|
|
27
|
-
domainId: "domain-id",
|
|
29
|
+
await mm.send.send(domainId, {
|
|
28
30
|
from: "hello",
|
|
29
31
|
to: "client@example.com",
|
|
30
32
|
subject: "Welcome!",
|
|
@@ -32,7 +34,7 @@ await mm.emails.send({
|
|
|
32
34
|
});
|
|
33
35
|
|
|
34
36
|
// List aliases for a domain
|
|
35
|
-
const aliases = await mm.aliases.list(
|
|
37
|
+
const aliases = await mm.aliases.list(domainId);
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
## Docs
|