{"id":30142048,"url":"https://github.com/lagden-development/pymailbear","last_synced_at":"2025-10-08T02:19:35.431Z","repository":{"id":303994164,"uuid":"995341799","full_name":"Lagden-Development/pymailbear","owner":"Lagden-Development","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-10T14:34:08.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T05:49:51.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lagden-Development.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-03T10:35:26.000Z","updated_at":"2025-07-10T14:34:12.000Z","dependencies_parsed_at":"2025-07-10T21:11:08.046Z","dependency_job_id":"7e8e4993-72ed-417f-8457-2df8cfca6302","html_url":"https://github.com/Lagden-Development/pymailbear","commit_stats":null,"previous_names":["lagden-development/pymailbear"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lagden-Development/pymailbear","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lagden-Development%2Fpymailbear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lagden-Development%2Fpymailbear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lagden-Development%2Fpymailbear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lagden-Development%2Fpymailbear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lagden-Development","download_url":"https://codeload.github.com/Lagden-Development/pymailbear/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lagden-Development%2Fpymailbear/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278877097,"owners_count":26061382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-11T05:37:19.765Z","updated_at":"2025-10-08T02:19:35.417Z","avatar_url":"https://github.com/Lagden-Development.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MailBear Python\n\nA simple, self-hosted forms backend built with Python and FastAPI. MailBear accepts form submissions via HTTP POST requests and forwards them as emails to configured recipients.\n\n## Features\n\n- **Simple Forms Backend**: Easy integration with any HTML form\n- **Multiple Forms**: Configure multiple forms with different settings\n- **Email Delivery**: Send form submissions via email\n- **Email Encryption**: Support for TLS, STARTTLS, and custom SSL contexts\n- **Domain Validation**: Control which domains can submit forms\n- **Rate Limiting**: Prevent abuse of your forms\n- **Metrics**: Prometheus metrics for monitoring\n- **Dashboard**: Web interface to view form submissions\n\n## Quick Start\n\n### Using Docker\n\n1. Clone this repository\n2. Copy `config_sample.yml` to `config.yml` and configure your settings\n3. Run with Docker Compose:\n\n```bash\ndocker-compose up -d\n```\n\n### Manual Setup\n\n1. Clone this repository\n2. Create a virtual environment and install dependencies:\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n3. Copy `config_sample.yml` to `config.yml` and configure your settings\n4. Run the application:\n\n```bash\npython main.py\n```\n\n## Configuration\n\nCreate a `config.yml` file based on the provided `config_sample.yml`:\n\n```yaml\n# Server settings\nport: 1234\nmetrics_port: 9090\nrate_limit: 5  # requests per minute\n\n# SMTP Configuration\nsmtp:\n  host: smtp.example.com\n  port: 587\n  username: your_username\n  password: your_password\n  from_email: forms@example.com\n  # Email encryption options\n  use_tls: null  # Set to true for SSL/TLS or null to auto-detect based on port\n  start_tls: null  # Set to true for STARTTLS or null to auto-detect based on port\n  verify_cert: true  # Set to false to disable SSL certificate verification (not recommended)\n  ssl_context: null  # Advanced SSL context settings\n  timeout: 60  # Connection timeout in seconds\n\n# Forms Configuration\nforms:\n  - id: contact\n    name: Contact Form\n    allowed_domains:\n      - example.com\n      - localhost\n    to_email: contact@example.com\n    subject: New Contact Form Submission\n```\n\n## Form Integration\n\nTo integrate a form with MailBear, use the form ID in the action URL:\n\n```html\n\u003cform action=\"http://your-mailbear-server:1234/api/v1/form/contact\" method=\"POST\"\u003e\n  \u003cinput type=\"text\" name=\"name\" placeholder=\"Name\" required\u003e\n  \u003cinput type=\"email\" name=\"email\" placeholder=\"Email\" required\u003e\n  \u003ctextarea name=\"message\" placeholder=\"Message\" required\u003e\u003c/textarea\u003e\n  \u003cbutton type=\"submit\"\u003eSend\u003c/button\u003e\n\u003c/form\u003e\n```\n\n## Dashboard\n\nAccess the dashboard at the root URL:\n\n```\nhttp://your-mailbear-server:1234/\n```\n\n## Email Encryption Options\n\nMailBear supports various email encryption options:\n\n- **Auto-detection**: By default, MailBear will automatically detect the encryption method based on the port:\n  - Port 465: Uses SSL/TLS (implicit TLS)\n  - Port 587: Uses STARTTLS (explicit TLS)\n\n- **Manual configuration**: You can override the auto-detection by setting these options in the config.yml:\n  - `use_tls`: Set to `true` to use implicit SSL/TLS, or `null` for auto-detection\n  - `start_tls`: Set to `true` to use STARTTLS, or `null` for auto-detection\n  - `verify_cert`: Set to `false` to disable SSL certificate verification (not recommended)\n  - `ssl_context`: Advanced SSL context settings\n  - `timeout`: Connection timeout in seconds\n\nExample for Gmail with explicit settings:\n```yaml\nsmtp:\n  host: smtp.gmail.com\n  port: 587\n  username: your_email@gmail.com\n  password: your_app_password\n  from_email: your_email@gmail.com\n  start_tls: true\n  use_tls: false\n  verify_cert: true\n  timeout: 30\n```\n\n## Metrics\n\nPrometheus metrics are available at:\n\n```\nhttp://your-mailbear-server:9090/\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden-development%2Fpymailbear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flagden-development%2Fpymailbear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden-development%2Fpymailbear/lists"}