-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
9 changed files
with
39 additions
and
21 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
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 |
---|---|---|
|
@@ -307,18 +307,19 @@ Envelope().attach(path="file.jpg") | |
* **.date(date)** `str|False` Specify Date header (otherwise Date is added automatically). If False, the Date header will not be added automatically. | ||
* **smtp**: SMTP server | ||
* **--smtp** | ||
* **.smtp(host="localhost", port=25, user=, password=, security=, timeout=3, attempts=3, delay=3)** | ||
* **.smtp(host="localhost", port=25, user=, password=, security=, timeout=3, attempts=3, delay=3, local_hostname=None)** | ||
* **Envelope(smtp=)** | ||
* Parameters: | ||
* `host` May include hostname or any of the following input formats (ex: path to an INI file or a `dict`) | ||
* `security` If not set, automatically set to `starttls` for port *587* and to `tls` for port *465* | ||
* `timeout` How many seconds should SMTP wait before timing out. | ||
* `attempts` How many times we try to send the message to an SMTP server. | ||
* `delay` How many seconds to sleep before re-trying a timed out connection. | ||
* `local_hostname` FQDN of the local host in the HELO/EHLO command. | ||
* Input format may be in the following form: | ||
* `None` default localhost server used | ||
* `smtplib.SMTP` object | ||
* `list` or `tuple` having `host, [port, [username, password, [security, [timeout, [attempts, [delay]]]]]]` parameters | ||
* standard [`smtplib.SMTP`](https://docs.python.org/3/library/smtplib.html) object | ||
* `list` or `tuple` having `host, [port, [username, password, [security, [timeout, [attempts, [delay, [local_hostname]]]]]]]` parameters | ||
* ex: `envelope --smtp localhost 125 [email protected]` will set up host, port and username parameters | ||
* `dict` specifying {"host": ..., "port": ...} | ||
* ex: `envelope --smtp '{"host": "localhost"}'` will set up host parameter | ||
|
@@ -330,7 +331,7 @@ Envelope().attach(path="file.jpg") | |
``` | ||
* Do not fear to pass the `smtp` in a loop, we make just a single connection to the server. If timed out, we attempt to reconnect once. | ||
```python3 | ||
smtp = localhost, 25 | ||
smtp = "localhost", 25 | ||
for mail in mails: | ||
Envelope(...).smtp(smtp).send() | ||
``` | ||
|
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
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 |
---|---|---|
|
@@ -42,5 +42,5 @@ | |
classifiers=[ | ||
'Programming Language :: Python :: 3' | ||
], | ||
python_requires='>=3.7', | ||
python_requires='>=3.10', | ||
) |
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