
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.
This Python library provides a class, EmailSender
, for sending emails using SMTP and saving sent emails via IMAP. It also includes utility classes and functions for email creation (Email
), custom MIME part handling (CustomMIMEMultipart
), and logging (MyLogger
, setup_logger
).
Email
class simplifies email construction, including handling recipients (To and CC), attachments, and HTML email bodies with signatures.CustomMIMEMultipart
class allows for customized MIME parts, including attachments and HTML body with inline images for signatures.SMTPResponse
objects for tracking success/failure of email sending.EmailSender
: Main class for sending emails. Manages SMTP and IMAP connections.Email
: Represents an email message, including headers, body, attachments, and signature.CustomMIMEMultipart
: Custom MIME part handling for attachments and HTML body.SMTPResponse
: Data model for the result of an email sending operation.MyLogger
: Wrapper around the standard logger to customize format temporarily.The library uses Python's built-in logging
module. You can provide your own logger or use the included setup_logger
function.
The EmailSender.send()
method returns an SMTPResponse
object, which contains a success
flag and an error
message if the email sending failed. This facilitates robust error handling.
The CustomMIMEMultipart
and Email
classes handle the formatting of the email, including attachments, HTML bodies, and signatures. The HTML body is generated from a template and uses a <pre>
tag to preserve the original layout and tabs in the email body.
The library attempts to automatically find the "Sent" folder on the IMAP server by checking common folder names.
Contributions are welcome! Please open an issue or submit a pull request.
FAQs
Unknown package
We found that dmt-smtp 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.