Skip to content

Commit 124bf0a

Browse files
committed
chore: mailer documentation
1 parent bb1f1b6 commit 124bf0a

File tree

4 files changed

+113
-1
lines changed

4 files changed

+113
-1
lines changed

content/blog/whats-new.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Follow the latest developments on Stormkit.
77

88
## Nov 4th, 2024
99

10-
Introducing [Persistent Volumes](/docs/features/volumes). Upload, manage and share files with ease.
10+
- Introducing [Persistent Volumes](/docs/features/volumes). Upload, manage and share files with ease.
11+
- Introducing [Mailer](/docs/features/mailer). Send transactional emails directly from your application.
1112

1213
## Oct 23rd, 2024
1314

content/docs/api--mailer.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Mailer API
3+
description: Send transactional emails programmatically using Stormkit API. Simple, efficient and free email service.
4+
---
5+
6+
# Mailer API
7+
8+
<details>
9+
10+
<summary>
11+
<span>POST </span><span>/v1/mail</span>
12+
</summary>
13+
14+
Requirements:
15+
16+
- Make sure the [mailer is configured](/docs/features/mailer) for your environment.
17+
- Make sure you have generated an Environment-level API Key.
18+
19+
Send an email.
20+
21+
```typescript
22+
interface Request {
23+
to: string
24+
from: string
25+
subject: string
26+
body: string
27+
}
28+
29+
interface Response {
30+
ok: boolean
31+
}
32+
```
33+
34+
```bash
35+
# Example
36+
37+
curl -X POST \
38+
-H 'Authorization: <api_key>' \
39+
-H 'Content-Type: application/javascript' \
40+
'https://api.stormkit.io/v1/mail' \
41+
-d '{ "to": "joe@example.org", "from": "Jane Doe <jane@example.org>", "subject": "Hello Joe", "body": "Hi,<br/>How are you?" }'
42+
```
43+
44+
</details>

content/docs/features--mailer.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Mailer
3+
description: Stormkit Mailer is a simple email service that allows you send transactional emails with ease.
4+
---
5+
6+
# Mailer
7+
8+
Stormkit Mailer is designed to provide a straightforward way to send transactional emails directly from your application. This feature is ideal for sending automated notifications, password resets, and other essential email communications.
9+
10+
With just a few configuration settings, you can connect Stormkit Mailer to your SMTP provider and start sending emails quickly and reliably.
11+
12+
## Configuration
13+
14+
- Navigate to the Environments tab and select the environment (e.g., production or staging) where you want to set up email functionality.
15+
- Go to Config > Mailer Configuration.
16+
17+
In the Mailer Configuration panel, you will find the following fields. Fill them out according to your SMTP provider’s details:
18+
19+
| Setting | Description |
20+
| ------------- | ----------------------------------------------------------------------------------------------------- |
21+
| **SMTP Host** | Enter the hostname of your SMTP server |
22+
| **SMTP Port** | Set the port for your SMTP server. Common ports are 587 (TLS), 465 (SSL) |
23+
| **Username** | Enter the username for SMTP authentication. Typically the email address associated with your account. |
24+
| **Password** | Enter the password for SMTP authentication. Ensure this is securely stored and not shared publicly. |
25+
26+
## Testing the Configuration
27+
28+
After entering your SMTP credentials, click the `Send test email` button to verify the configuration.
29+
30+
You should receive a confirmation email if the SMTP settings are correct. If there’s an error, double-check your SMTP settings or contact your SMTP provider for assistance.
31+
32+
Once you’re satisfied with the settings, click `Save` to store the SMTP configuration for your environment.
33+
34+
## Example (Gmail)
35+
36+
| Setting | Value |
37+
| --------- | ------------------------------------------------------------------------- |
38+
| SMTP Host | smtp.gmail.com |
39+
| SMTP Port | 587 |
40+
| Username | your-email@example.com |
41+
| Password | Your Gmail app password (if using 2FA, generate an app-specific password) |
42+
43+
## Sending emails programmatically
44+
45+
- Generate an API key for your environment: **Environment** > **Config** > **API Keys**
46+
- Refer to our [API documentation](/docs/api/mailer)
47+
48+
## Additional Notes
49+
50+
- SMTP Security: Ensure that your SMTP credentials are kept secure and only accessible by authorized personnel.
51+
- App Passwords for Gmail: If you’re using Gmail as your SMTP provider and have two-factor authentication (2FA) enabled, you’ll need to create an app-specific password in your Google account.
52+
53+
## Troubleshooting:
54+
55+
If you encounter issues, confirm the following:
56+
57+
- Your SMTP host and port are correct.
58+
- Your email provider supports the port and authentication type you’ve selected.
59+
- Any firewall or security settings on your network allow outbound SMTP traffic.
60+
61+
For further assistance, refer to your SMTP provider’s documentation or reach out to us.

public/sitemap.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@
126126
<changefreq>weekly</changefreq>
127127
<priority>0.6</priority>
128128
</url>
129+
<url>
130+
<loc>https://www.stormkit.io/docs/features/mailer</loc>
131+
<lastmod>2024-11-04</lastmod>
132+
<changefreq>weekly</changefreq>
133+
<priority>0.6</priority>
134+
</url>
129135
<url>
130136
<loc>https://www.stormkit.io/docs/features/multiple-environments</loc>
131137
<lastmod>2024-08-12</lastmod>

0 commit comments

Comments
 (0)