
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Littlemail is a straight-forward command-line SMTP email sending tool in Python, which sends one email per command. (If you send many emails, every sending will make a new connection with the smtp server.)
$ pip install littlemail
There is no way to reduce parameters provided in command-line, since that's the way of email. So, please refer to the inline help for options you need. Fortunately, many options have default value.
$ python -m littlemail -h # inline help
Anyway, here is a minimal example and a few lines of explanation:
$ python -m littlemail -s test [-c hello] \
-f 12345@qq.com \
--to 54321@qq.com \
--smtp smtp.qq.com [-p abcdefg]
-c
means the email content, which is optional. That means you can
send empty-content email. And this optional parameter enables the
capability of littlemail to get content from pipe (input
redirection), which might be easier for you to construct your message,
such as:
$ python -m littlemail <...> < my_email_content.txt
-s
represents subject, which is mandatory and cannot be empty.
-p
stands for password, and it is optional. When it's missing,
littlemail tries to get password from LITTLEMAIL_PASSWD
environment variable.
When something goes wrong, try --debug
.
There is an API you can invoke to send email in your code:
# import
from littlemail import send_email
# signature
def send_email(subject: str,
*,
text: str = '',
contype: str = 'plain',
alist: list[str] = [],
to: list[str],
cc: list[str] = [],
bcc: list[str] = [],
fromaddr: str,
smtp: str,
port: int = 587,
timeout: int = 3,
protocol: str = 'tls',
passwd: str|None,
debug: bool = False) -> None: ...
api_test.py
is used as an example and testcase for you to try,
have fun! ^___^
FAQs
Command-line SMTP email sending tool in Python
We found that littlemail demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.