{"id":21401610,"url":"https://github.com/stardogventures/templatemail","last_synced_at":"2026-05-20T19:32:43.238Z","repository":{"id":66940378,"uuid":"73271078","full_name":"stardogventures/templatemail","owner":"stardogventures","description":"Template-based email library for Java 8","archived":false,"fork":false,"pushed_at":"2018-10-16T21:47:13.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T03:15:28.638Z","etag":null,"topics":["amazon-ses","email","email-template","handlebars","java","java-8","mailgun","sailthru","ses"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stardogventures.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":"2016-11-09T09:51:18.000Z","updated_at":"2018-10-16T21:45:12.000Z","dependencies_parsed_at":"2023-05-30T09:45:50.306Z","dependency_job_id":null,"html_url":"https://github.com/stardogventures/templatemail","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardogventures%2Ftemplatemail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardogventures%2Ftemplatemail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardogventures%2Ftemplatemail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardogventures%2Ftemplatemail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stardogventures","download_url":"https://codeload.github.com/stardogventures/templatemail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893901,"owners_count":20364919,"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":["amazon-ses","email","email-template","handlebars","java","java-8","mailgun","sailthru","ses"],"created_at":"2024-11-22T15:28:37.993Z","updated_at":"2026-05-20T19:32:43.169Z","avatar_url":"https://github.com/stardogventures.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# templatemail\n\nA simple template-based email library for Java 8.\n\nApplications often need to send transactional emails, such as welcomes, notifications, and password resets. This simple library implements an `TemplateEmailer` class which abstracts out the email service, allowing your code to easily send templates without worrying about the underlying implementation.\n\nCurrently supported services:\n  * [Amazon SES](https://aws.amazon.com/ses/)\n  * [Sailthru](https://getstarted.sailthru.com/)\n  * [Mailgun](https://www.mailgun.com/)\n  * Basic SMTP for testing using [MailCatcher](https://mailcatcher.me)\n\n(Full disclosure: The library author is the former CTO of Sailthru, so these are the services I personally like and use. But happy to accept contributions for other email services.)\n\nFor Amazon SES and Mailgun, email templates are stored locally, using [Handlebars](http://handlebarsjs.com/) templates. Sailthru hosts email templates on the service, so templates do not need to be maintained locally.\n\n## Maven Installation\n\nAdd the following dependency to your POM file:\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.stardog\u003c/groupId\u003e\n    \u003cartifactId\u003etemplatemail\u003c/artifactId\u003e\n    \u003cversion\u003e0.7.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Example Usage\n\n```java\nAmazonSimpleEmailServiceClient sesClient = new AmazonSimpleEmailServiceClient();\nTemplateEmailer emailer = new AmazonSesEmailer(sesClient);\n\n// add any number of global variables. These vars will be passed to every template automatically\nemailer.putGlobalVar(\"MY_GLOBAL_VAR\", \"MY_GLOBAL_VALUE\");\n\n// add any number of templates\nemailer.addTemplate(EmailTemplate.builder()\n        .templateName(\"welcome\")\n        .fromEmail(\"info@example.com\")\n        .fromName(\"Example Name\")\n        .subject(\"Welcome, {{name}}!\")\n        .contentHtml(\"\u003cp\u003eWelcome to our service, {{name}}. Var: {{myvar}}\u003c/p\u003e\")\n        .build());\n        \n// send a template\nMap\u003cString,Object\u003e vars = new HashMap\u003c\u003e();\nvars.put(\"myvar\", \"var value\");\nemailer.sendTemplate(\"welcome\", \"useremail@example.com\", \"User Name\", vars);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardogventures%2Ftemplatemail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstardogventures%2Ftemplatemail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardogventures%2Ftemplatemail/lists"}