-
-
Notifications
You must be signed in to change notification settings - Fork 769
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc3624c
commit d38c149
Showing
7 changed files
with
55 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2941,11 +2941,17 @@ format is: | |
[email protected] | ||
``` | ||
|
||
If [access control](config.md#access-control) is enabled, and the target topic does not support anonymous writes, e-mail publishing won't work without providing an authorized access token. That will change the format of the e-mail's recipient address to | ||
If [access control](config.md#access-control) is enabled, and the target topic does not support anonymous writes, e-mail publishing won't work | ||
without providing an authorized access token or using SMTP AUTH PLAIN. | ||
|
||
If you use [access tokens](#access-tokens), that will change the format of the e-mail's recipient address to | ||
``` | ||
[email protected] | ||
``` | ||
|
||
To use [username/password](https://docs.ntfy.sh/publish/#username-password), you can use SMTP PLAIN auth when authenticating | ||
to the ntfy server. | ||
|
||
As of today, e-mail publishing only supports adding a [message title](#message-title) (the e-mail subject). Tags, priority, | ||
delay and other features are not supported (yet). Here's an example that will publish a message with the | ||
title `You've Got Mail` to topic `sometopic` (see [ntfy.sh/sometopic](https://ntfy.sh/sometopic)): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ func TestFormatMail_Basic(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: A simple message | ||
Content-Type: text/plain; charset="utf-8" | ||
|
@@ -36,6 +37,7 @@ func TestFormatMail_JustEmojis(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: =?utf-8?b?8J+YgCBBIHNpbXBsZSBtZXNzYWdl?= | ||
Content-Type: text/plain; charset="utf-8" | ||
|
@@ -57,6 +59,7 @@ func TestFormatMail_JustOtherTags(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: A simple message | ||
Content-Type: text/plain; charset="utf-8" | ||
|
@@ -80,6 +83,7 @@ func TestFormatMail_JustPriority(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: A simple message | ||
Content-Type: text/plain; charset="utf-8" | ||
|
@@ -103,6 +107,7 @@ func TestFormatMail_UTF8Subject(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: =?utf-8?b?IDo6IEEgbm90IHNvIHNpbXBsZSB0aXRsZSDDtsOkw7zDnyDCoUhvbGEsIHNl?= =?utf-8?b?w7FvciE=?= | ||
Content-Type: text/plain; charset="utf-8" | ||
|
@@ -126,6 +131,7 @@ func TestFormatMail_WithAllTheThings(t *testing.T) { | |
}) | ||
expected := `From: "ntfy.sh/alerts" <[email protected]> | ||
To: [email protected] | ||
Date: Fri, 24 Dec 2021 21:43:24 +0000 | ||
Subject: =?utf-8?b?4pqg77iPIPCfkoAgT2ggbm8g8J+ZiCBUaGlzIGlzIGEgbWVzc2FnZSBhY3Jv?= =?utf-8?b?c3MgbXVsdGlwbGUgbGluZXM=?= | ||
Content-Type: text/plain; charset="utf-8" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters