--- id: mailosaur version: "8.1.1" license: MIT license_treatment: permissive maintenance: active --- # mailosaur — The Mailosaur Python library lets you integrate email and SMS testing into your continuous integration process. License: permissive · Maintenance: active · Downloads: 127.0K/mo ## What it is and what it does Mailosaur is a Python client for the Mailosaur email and SMS testing service. It provides a programmatic interface to retrieve, search, and inspect messages sent to test inboxes—useful for automating verification of password resets, account confirmations, MFA codes, and other transactional communications in CI/CD pipelines. The library handles both email and SMS, automatically extracting verification codes from message bodies and providing access to HTML, plain text, attachments, and hyperlinks. The package depends on requests for HTTP communication, python-dateutil for timestamp handling, and tzlocal for timezone support. It integrates with the Mailosaur cloud service, so it requires an active account and API key. The library is designed to work with test email addresses under your Mailosaur server domain and supports searching messages by recipient, subject, and other criteria. Use it for: - Automate testing of password-reset email flows in end-to-end test suites. - Extract and validate one-time passcodes from SMS or email during account verification tests. - Verify that transactional emails are correctly formatted and contain expected content. - Test email delivery and content in staging environments without sending to real addresses. - Validate HTML and plain-text email rendering as part of continuous integration. - Test multi-factor authentication flows that rely on email or SMS delivery. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Mailosaur is a Python client library for automating email and SMS testing, letting you retrieve and inspect messages sent to test inboxes as part of CI/CD workflows. Yes. Mailosaur is actively maintained, has no known vulnerabilities, and solves a real problem in testing transactional email and SMS flows. Install it if you need to automate email or SMS verification in your test suite. The permissive MIT license and low dependency footprint make it a low-risk addition. The main condition is that you need a Mailosaur account and API key to use it. ## Install pip install mailosaur uv add mailosaur poetry add mailosaur ## Installing mailosaur Before you install: Low friction installation with three lightweight runtime dependencies (python-dateutil, tzlocal, requests). The package is actively maintained with a recent release and no known vulnerabilities. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install mailosaur from mailosaur import MailosaurClient from mailosaur.models import SearchCriteria mailosaur = MailosaurClient() criteria = SearchCriteria() criteria.sent_to = "test@abc123.mailosaur.net" email = mailosaur.messages.get("abc123", criteria) print(email.subject) Requires MAILOSAUR_API_KEY environment variable to be set; a Mailosaur account and API key must be obtained from mailosaur.com. Verify before relying: - Whether the library fully supports modern Python versions beyond those explicitly listed in classifiers (3.7+). - Performance characteristics when handling large volumes of messages or attachments. - Whether SMS testing requires additional setup beyond API key configuration. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 127.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags email testing automation, sms testing api client, test email retrieval, automated verification code extraction, ci/cd email testing, fake smtp testing, end-to-end email testing, email-testing, sms-testing, ci-cd [View on SkillFed](https://skillfed.io/packages/mailosaur) · [View on PyPI](https://pypi.org/project/mailosaur/)