Update readme
This commit is contained in:
parent
754184628e
commit
746e44942f
1 changed files with 28 additions and 7 deletions
33
README.md
33
README.md
|
@ -2,16 +2,27 @@
|
||||||
|
|
||||||
Easily send mails via SMTP and python
|
Easily send mails via SMTP and python
|
||||||
|
|
||||||
## Setup
|
## Installation
|
||||||
1. Copy `vars.py.example` to `vars.py`
|
To install the requirements, run the following command
|
||||||
2. Setup `vars.py` with your credentials and config
|
```
|
||||||
3. Adapt `message.htmt` and save your contact list to `contacts.csv`
|
python -m pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```python mail.py```
|
|
||||||
|
### Setup
|
||||||
|
1. Copy `vars.py.example` to `vars.py`
|
||||||
|
2. Setup `vars.py` with your credentials and config
|
||||||
|
3. Adapt `message.html` and save your contact list to `contacts.csv`
|
||||||
|
|
||||||
|
### Send mail
|
||||||
|
Just run
|
||||||
|
```sh
|
||||||
|
python mail.py
|
||||||
|
```
|
||||||
|
|
||||||
## Templating
|
## Templating
|
||||||
You can use the keys from your `csv` directly, prepending a `$` sign. For example:
|
You can use the keys from your `csv` directly, prepending a `$` sign (case sensitive!). For example:
|
||||||
```
|
```
|
||||||
Hello $name, your value is $value!
|
Hello $name, your value is $value!
|
||||||
```
|
```
|
||||||
|
@ -24,3 +35,13 @@ With a `contacts.csv` looking like:
|
||||||
| name | value |
|
| name | value |
|
||||||
|--------|-------|
|
|--------|-------|
|
||||||
| h4xx0r | 1337 |
|
| h4xx0r | 1337 |
|
||||||
|
|
||||||
|
## Options
|
||||||
|
### Sending behavior
|
||||||
|
Some mail servers will block the requests, if too many are sent too fast. You can use the variables to add delays:
|
||||||
|
- `WAIT_EVERY` the amount of mails sent at once
|
||||||
|
- `DELAY_SEC` the amount of seconds to wait between sending the next batch
|
||||||
|
|
||||||
|
### Other options
|
||||||
|
- `LOGLEVEL` the logging level, set to `'DEBUG'` for most output
|
||||||
|
- `DRY_RUN` if set to `True`, the mails wont get sent, but the output is generated as if they would be sent. Good for testing and best to use with `LOGLEVEL = 'DEBUG'`
|
Loading…
Reference in a new issue