Compare commits
2 Commits
722ee8dec0
...
0d06aee062
Author | SHA1 | Date | |
---|---|---|---|
0d06aee062 | |||
badb46a595 |
27
README.md
27
README.md
|
@ -68,6 +68,13 @@ cert-info.sh www.hmp.today
|
||||||
cert-info.sh /etc/ssl/certs/ca-certificates.crt
|
cert-info.sh /etc/ssl/certs/ca-certificates.crt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example usage in terminal without download:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today
|
||||||
|
bash <(wget -qO- https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today
|
||||||
|
```
|
||||||
|
|
||||||
____
|
____
|
||||||
|
|
||||||
## `sendmail`.py
|
## `sendmail`.py
|
||||||
|
@ -95,7 +102,7 @@ ____
|
||||||
|**[--file]**|mail attachment files|`None`|
|
|**[--file]**|mail attachment files|`None`|
|
||||||
|**[--time]**|minutes of attempts to send|3|
|
|**[--time]**|minutes of attempts to send|3|
|
||||||
|
|
||||||
Example usage in terminal:
|
Example usage in terminal with make the script executable:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# download
|
# download
|
||||||
|
@ -105,12 +112,24 @@ sudo chmod +x /usr/local/bin/sendmail.py
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# example 1
|
# example 1
|
||||||
sendmail.py -u user@gmail.com -p pass -d addr1@gmail.com,addr2@gmail.com
|
sendmail.py -u user@gmail.com -p password -d addr1@gmail.com,addr2@gmail.com
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# example 2
|
# example 2
|
||||||
/usr/local/opt/python-3.9/bin/python3.9 /usr/local/bin/sendmail.py -u user@gmail.com -p pass -d addr1@gmail.com,addr2@gmail.com --file "/path/to/file1,/path/to/file2"
|
/usr/local/opt/python-3.9/bin/python3.9 /usr/local/bin/sendmail.py -u user@gmail.com -p password -d addr1@gmail.com,addr2@gmail.com --file "/path/to/file1,/path/to/file2"
|
||||||
|
```
|
||||||
|
|
||||||
|
Example usage in terminal without download:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/sendmail.py) \
|
||||||
|
--user user@gmail.com \
|
||||||
|
--pass password \
|
||||||
|
--dest addr1@gmail.com,addr2@gmail.com \
|
||||||
|
--subj "test subject" \
|
||||||
|
--text "test body" \
|
||||||
|
--file "/path/to/file1,/path/to/file2"
|
||||||
```
|
```
|
||||||
|
|
||||||
Example usage in Python:
|
Example usage in Python:
|
||||||
|
@ -118,7 +137,7 @@ Example usage in Python:
|
||||||
```Python
|
```Python
|
||||||
from sendmail import Mail
|
from sendmail import Mail
|
||||||
|
|
||||||
msg = Mail(smtp_user='user@gmail.com', smtp_pass='pass', mail_dest='addr1@gmail.com,addr2@gmail.com')
|
msg = Mail(smtp_user='user@gmail.com', smtp_pass='password', mail_dest='addr1@gmail.com,addr2@gmail.com')
|
||||||
log = msg.send()
|
log = msg.send()
|
||||||
print(log)
|
print(log)
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user