Skip to content

Commit

Permalink
added documantation
Browse files Browse the repository at this point in the history
  • Loading branch information
marktennyson committed Aug 11, 2021
1 parent c477f57 commit eb0ff52
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Sending emails using Falsk-Email

#### Here I have tried to demonstrate some basic functionalities of flask-mailing module.
## List of Examples

##### Basic configuration
### Basic configuration

```python

Expand Down Expand Up @@ -45,7 +45,7 @@ async def simple_send():
return jsonify(status_code=200, content={"message": "email has been sent"})
```

##### Send a simple html message
### Send a simple html message
```python

html = """
Expand All @@ -67,7 +67,7 @@ async def html_email():
return jsonify(status_code=200, content={"message": "email has been sent"})
```

##### Sending files
### Sending files

```python
@app.get("/mail-file")
Expand All @@ -82,7 +82,7 @@ async def mail_file():
return jsonify(message="email sent")
```

##### Using Jinja2 HTML Templates
### Using Jinja2 HTML Templates

You can enable Jinja2 HTML Template emails by setting the `TEMPLATE_FOLDER` configuration option, and supplying a value (which is just the name of the template file within the `TEMPLATE_FOLDER` dir) for the `template_name` parameter in `Mail.send_message()`. You then can pass a Dict as the `template_body` property of your `Message` object. If you haven't provided the `TEMPLATE_FOLDER` configuration option, then the module will take the app's jinja2 environment for templating and you can use templates from app's default template folder:

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flask-mail
# Flask-mailing

The flask-mailing simple lightweight mail system, sending emails and attachments(individual && bulk)

Expand Down Expand Up @@ -30,7 +30,7 @@ then the utility will save it in the list or set by default.



## Writing unittests using Flask-Mail
## Writing unittests using Flask-Mailing
Flask mails allows you to write unittest for your application without sending emails to
non existent email address by mocking the email to be sent. To mock sending out mails, set
the suppress configuraton to true. Suppress send defaults to False to prevent mocking within applications.
Expand Down
42 changes: 42 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
site_name: Flask-MAILING
site_url:
site_description: flask-mailing
dev_addr: 127.0.0.1:8080

theme:
name: material
palette:
scheme: slate
primary: teal
accent: purple

icon:
repo: fontawesome/brands/github



repo_name: flask-mailing
repo_url: https://github.com/marktennyson/flask-mailing
edit_uri: ''

plugins:
- search
- markdownextradata:
data: data

markdown_extensions:
- toc:
permalink: true

- pymdownx.highlight:
linenums: false

- pymdownx.superfences

nav:
- Flask MAILING: index.md
- 🔨 Installation: install.md
- 🕹 Getting Started: getting-started.md
- Example: example.md
- Contribution: contribute.md

0 comments on commit eb0ff52

Please sign in to comment.