Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mauricelambert/simpletelnetmail

Send simples emails with Telnet.
https://github.com/mauricelambert/simpletelnetmail

email email-sender package pypi pypi-package python3 telnet

Last synced: about 10 hours ago
JSON representation

Send simples emails with Telnet.

Awesome Lists containing this project

README

        

# SimpleTelnetMail

## Requirements
This package require :
- python3
- python3 Standard Library

## Installation
```bash
pip install SimpleTelnetMail
```

## Description
Send simples emails with Telnet.

## Examples

### Simple usage

#### Command line
```bash
SimpleTelnetMail --host="smtp.server.com" --from="[email protected]" --to="[email protected]" --message="Secret and not secure email with Telnet."
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected]" -m "Secret and not secure email with Telnet." --username="[email protected]" --password="password"
```

#### Python
```python
from SimpleTelnetMail import TelnetMail

client = TelnetMail("my.server.com", from_ = "[email protected]", to = ["[email protected]"], message = "Secret and secure email with Telnet.")
client.send_mail()

client = TelnetMail("my.server.com", from_ = "[email protected]", to = ["[email protected]"], message = "Secret and secure email with Telnet.", username="[email protected]", password="password")
client.send_mail()
```

### Advanced usage

#### Command line
Don't forgot to use `--ssl` or `-s` option to secure your email with **SSL**/**TLS**.
1. Without authentication, with custom headers, to several recipients:
```bash
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected],[email protected]" -m "Secret and secure email with Telnet." --port=587 --pseudo="Me" --debug=4 --ssl --ehlo="MYPC" Date="Sat, 19 Dec 2020 01:02:03 -0000" Subject="Secret Email" MIME_Version="1.0", Encrypted="ROT13", Fake="Fake hearder", Sender="PSEUDO ", Comments="My comment", Keywords="Email, Secret", Expires="Sat, 25 Dec 2021 05:35:23 -0000", Language="en-EN, it-IT", Importance="hight", Priority="urgent", Sensibility="Company-Confidential", From="PSEUDO ", To="[email protected],[email protected]", Content_Type="text/plain; charset=us-ascii", Content_Transfer_Encoding="quoted-printable"
```

2. With authentication
```bash
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected]" -m "Secret and secure email with Telnet." -U "[email protected]" -W "password" --port=587 --pseudo="Me" --debug=4 --ssl --ehlo="MYPC"
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected]" -m "Secret and secure email with Telnet." -U "[email protected]" -W "password" -p 587 -P "Me" -d 4 -s -e "MYPC" Subject="Hello" MIME_Version="1.0" Content_Transfer_Encoding="quoted-printable" Content_Type="text/plain; charset=us-ascii"
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected]" -m "Secret and secure email with Telnet." -U "[email protected]" -W "password" -p 587 -P "Me" -d 4 -s -e "MYPC" Subject="Hello" MIME_Version="1.0" Content_Transfer_Encoding="7bit" Content_Type="text/plain; charset=utf-8"
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected]" -m "U2VjcmV0IGFuZCBzZWN1cmUgZW1haWwgd2l0aCBUZWxuZXQu" -U "[email protected]" -W "password" -p 587 -P "Me" -d 4 -s -e "MYPC" Subject="Hello" MIME_Version="1.0" Content_Transfer_Encoding="base64" Content_Type="text/plain; charset=utf-8"
SimpleTelnetMail -H "smtp.server.com" -f "[email protected]" -t "[email protected],[email protected]" -m "PHA+U2VjcmV0IGFuZCBzZWN1cmUgZW1haWwgd2l0aCBUZWxuZXQuPC9wPg==" -U "[email protected]" -W "password" -p 587 -P "Me" -d 4 -s -e "MYPC" Subject="Hello" MIME_Version="1.0" Content_Transfer_Encoding="base64" Content_Type="text/html; charset=utf-8"
```

#### Python
1. Without authentication, with custom headers, to several recipients:
```python
from SimpleTelnetMail import TelnetMail

client = TelnetMail("my.server.com", port= 87, from_="[email protected]", to=["[email protected]", "[email protected]"], message="Secret and secure email with Telnet.", ehlo="MYPC", pseudo="Me", ssl=True, debug=4, Subject="Secret Email", Date="Sat, 19 Dec 2020 01:02:03 -0000", MIME_Version="1.0", Encrypted="ROT13", Fake="Fake hearder", Sender="PSEUDO ", Comments="My comment", Keywords="Email, Secret", Expires="Sat, 25 Dec 2021 05:35:23 -0000", Language="en-EN, it-IT", Importance="hight", Priority="urgent", Sensibility="Company-Confidential", From="PSEUDO ", To="[email protected],[email protected]", Content_Type="text/plain; charset=us-ascii", Content_Transfer_Encoding="quoted-printable")
client.send_mail()

print(repr(client))
print(client)
print(client.responses.decode())
```

2. With authentication
```python
from SimpleTelnetMail import TelnetMail

client = TelnetMail("my.server.com", port=587, from_="[email protected]", to=["[email protected]"], message="Secret and secure email with Telnet.", ehlo="MYPC", pseudo="Me", ssl=True, debug=4, username="[email protected]", password="password")
client.send_mail()

print(repr(client))
print(client)
print(client.responses.decode())

client = TelnetMail("my.server.com", port=587, from_="[email protected]", to=["[email protected]"], message="Secret and secure email with Telnet.", ehlo="MYPC", pseudo="Me", ssl=True, debug=4, username="[email protected]", password="password", Subject="Hello", MIME_Version="1.0", Content_Transfer_Encoding="quoted-printable", Content_Type="text/plain; charset=us-ascii")
client.send_mail()

client = TelnetMail("my.server.com", port=587, from_="[email protected]", to=["[email protected]"], message="PHA+U2VjcmV0IGFuZCBzZWN1cmUgZW1haWwgd2l0aCBUZWxuZXQuPC9wPg==", ehlo="MYPC", pseudo="Me", ssl=True, debug=4, username="[email protected]", password="password", Subject="Hello", MIME_Version="1.0", Content_Transfer_Encoding="base64", Content_Type="text/html; charset=utf-8")
client.send_mail()
```

## Link
[Github Page](https://github.com/mauricelambert/SimpleTelnetMail)

## Licence
Licensed under the [GPL, version 3](https://www.gnu.org/licenses/).