{"id":22396965,"url":"https://github.com/atrox/mailgen","last_synced_at":"2026-01-23T02:18:24.077Z","repository":{"id":63094908,"uuid":"565244584","full_name":"Atrox/mailgen","owner":"Atrox","description":"Mailgen: Rust crate that generates clean, responsive HTML and text e-mails for sending transactional mail","archived":false,"fork":false,"pushed_at":"2024-08-19T04:56:18.000Z","size":73,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T21:46:49.829Z","etag":null,"topics":["mailgen","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Atrox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-11-12T19:34:03.000Z","updated_at":"2024-05-20T10:14:26.000Z","dependencies_parsed_at":"2024-01-29T22:27:22.010Z","dependency_job_id":"29cc9097-4862-4184-9e97-ff1a3a14aef0","html_url":"https://github.com/Atrox/mailgen","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"df79b694633777d80985ebac825dc9f3746dd598"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fmailgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fmailgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fmailgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fmailgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atrox","download_url":"https://codeload.github.com/Atrox/mailgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637832,"owners_count":21137538,"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","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":["mailgen","rust"],"created_at":"2024-12-05T06:10:02.560Z","updated_at":"2026-01-23T02:18:24.071Z","avatar_url":"https://github.com/Atrox.png","language":"Rust","readme":"# mailgen\n\n[![Crates.io](https://img.shields.io/crates/v/mailgen)](https://crates.io/crates/mailgen)\n[![Documentation](https://docs.rs/mailgen/badge.svg)](https://docs.rs/mailgen)\n[![License](https://img.shields.io/crates/l/mailgen)](LICENSE)\n\nThis crate allows you to generate pretty emails without all the hassle.\n\nInspired by the node.js package [mailgen](https://github.com/eladnava/mailgen).\n\n# Examples\n\n```rust\nuse mailgen::themes::DefaultTheme;\nuse mailgen::{Action, Branding, EmailBuilder, Greeting, Mailgen};\n\nlet theme = DefaultTheme::new();\nlet branding = Branding::new(\"test product\", \"https://testproduct.com\");\nlet mailgen = Mailgen::new(\u0026theme, branding);\n\nlet email = EmailBuilder::new()\n    .greeting(Greeting::Name(\"person name\"))\n    .intro(\"test intro\")\n    .intro(\"another intro\")\n    .dictionary(\"test key\", \"test value\")\n    .dictionary(\"test key 2\", \"test value 2\")\n    .action(Action {\n            text: \"Test Action\",\n        link: \"https://test.com/action\",\n        color: Some((\"black\", \"white\")),\n        ..Default::default()\n    })\n    .action(Action {\n            text: \"Test Action 2\",\n        link: \"https://test.com/action2\",\n        instructions: Some(\"test instruction\"),\n        ..Default::default()\n    })\n    .outro(\"test outro 1\")\n    .outro(\"test outro 2\")\n    .signature(\"test signature...\")\n    .build();\n\nlet rendered = mailgen.render_text(\u0026email)?;\nstd::fs::write(\"./email.txt\", \u0026rendered)?;\n\nlet rendered = mailgen.render_html(\u0026email)?;\nstd::fs::write(\"./email.html\", \u0026rendered)?;\n```\n\n![default theme](default-theme.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrox%2Fmailgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatrox%2Fmailgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrox%2Fmailgen/lists"}