This plugin lets you plan small emails inside your Obsidian notes.
- Go to Community Plugins in your Obsidian Settings and disable Safe Mode
- Click on Browse and search for "Email Block"
- Click install
- Toggle the plugin on in the Community Plugins tab
- Download the latest release
*.zip
file. - Unpack the zip in the
.obsidan/plugins
folder of your obsidian vault
Add the "email" code block into your note:
... with plain text as body content:
```email
to: info@randommail.com
subject: My Subject
body: "Hey info,
here is some content"
```
... with a referenced note as body content:
```email
to: info@randommail.com
subject: My Subject
body: [[MyMail4711]]
variables:
myvar: TestVar
```
You can use the variables
parameter to replace placeholders in your body text with the variable values.
To include a variable in the body text just add a placeholder {{myvar}}
.
Variables from fontmatter data can be used as well.
... with a body text after the yaml:
```email
to: info@randommail.com
subject: Hello World
---
Hi there,
this is my new body
Best!
JB
```
... you can use properties, like variables, on the subject or within the body:
```email
to: info@randommail.com
subject: reminder for {{name}}
---
Dear {{name}},
this is not a personal email.
Regards,
FI
```
You can customize the view with the following parameters:
Parameter | Description | Values | Required |
---|---|---|---|
to | The main receiver of the mail. Multiple receiver seperated by ",". | String / List of Strings | |
cc | The cc receiver of the mail. Multiple receiver seperated by ",". | String / List of Strings | |
bcc | The bcc receiver of the mail. Multiple receiver seperated by ",". | String value / List of Strings | |
subject | The subject of the email. Plain text or combined text with variables | String value | x |
body (1) | The body of the email. Plain text or a link to a [[NoteFile]] (2). | String value | x |
showmailto | Show the "mailto" link after the mail body. | true/false (Default: true) | |
variables | A map of placeholder variables. | YAML Object | |
from | A from field (only for documentation). | String value |
- The body can be appended after the yaml with a "---" separation
- No formatting is supported (only new lines) (reason).
- Clone this repo into the plugin folder of a (non-productive) vault (
.obsidian/plugins/
) npm i
npm run dev
- Toggle the plugin on in the Community Plugins tab
Thank you for your contributions!