
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
dmt-smtp
Advanced tools
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.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.