{"id":32191893,"url":"https://github.com/clojurewerkz/mailer","last_synced_at":"2025-10-22T01:53:22.304Z","repository":{"id":2908340,"uuid":"3917136","full_name":"clojurewerkz/mailer","owner":"clojurewerkz","description":"An ActionMailer-inspired mailer library. Combines Postal, Clostache, some conventions and support for multiple delivery modes","archived":false,"fork":false,"pushed_at":"2017-12-04T21:29:14.000Z","size":61,"stargazers_count":106,"open_issues_count":5,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-19T01:29:35.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/clojurewerkz.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-03T11:07:55.000Z","updated_at":"2025-04-08T20:02:17.000Z","dependencies_parsed_at":"2022-09-04T12:50:09.531Z","dependency_job_id":null,"html_url":"https://github.com/clojurewerkz/mailer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/clojurewerkz/mailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurewerkz%2Fmailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurewerkz%2Fmailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurewerkz%2Fmailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurewerkz%2Fmailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojurewerkz","download_url":"https://codeload.github.com/clojurewerkz/mailer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurewerkz%2Fmailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365582,"owners_count":26318385,"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-21T02:00:06.614Z","response_time":58,"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-10-22T01:53:19.117Z","updated_at":"2025-10-22T01:53:22.298Z","avatar_url":"https://github.com/clojurewerkz.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is Clojurewerkz Mailer\n\nMailer is an ActionMailer-inspired mailer library for Clojure. It combines [Postal](https://github.com/drewr/postal), [Clostache](https://github.com/fhd/clostache)\nand a number of its own features and conventions to make delivering complex template-based emails as painless as possible.\n\n\n## Project Goals\n\n * Do not reinvent the wheel\n * Email delivery should be testable\n * Steal good parts from ActionMailer\n\n\n## Project Maturity\n\nMailer is a moderately mature project, the API hasn't changed in several years.\n\n\n\n## Maven Artifacts\n\nMailer artifacts are [released to Clojars](https://clojars.org/clojurewerkz/mailer).\nIf you are using Maven, add the following repository definition to your\n\n`pom.xml`:\n\n``` xml\n\u003crepository\u003e\n  \u003cid\u003eclojars.org\u003c/id\u003e\n  \u003curl\u003ehttp://clojars.org/repo\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n\n### The Most Recent Release\n\nWith Leiningen:\n\n    [clojurewerkz/mailer \"1.3.0\"]\n\nWith Maven:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003eclojurewerkz\u003c/groupId\u003e\n      \u003cartifactId\u003emailer\u003c/artifactId\u003e\n      \u003cversion\u003e1.3.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\n\n## Documentation\n\nMailer uses Mustache templates on the classpath and Postal mail message attribute maps. Key functions are:\n\n * `clojurewerkz.mailer.core/build-email`\n * `clojurewerkz.mailer.core/deliver-email`\n * `clojurewerkz.mailer.core/render`\n * `clojurewerkz.mailer.core/delivery-mode!`\n * `clojurewerkz.mailer.core/with-delivery-mode`\n * `clojurewerkz.mailer.core/with-settings`\n\n``` clojure\n(ns my-app\n  (:require [clojurewerkz.mailer.core :refer [delivery-mode! with-settings with-defaults with-settings build-email deliver-email]]))\n\n;; set default delivery mode (:smtp, :sendmail or :test)\n(delivery-mode! :test)\n\n;; build a message (can be used in unit tests or for various forms of delayed delivery)\n;;\n;; Pleasen note that email/templates/warning.mustache should be on your classpath. For example, with Leiningen 2,\n;; you would use :resource-paths for this, like so: :resource-paths [\"src/resources\"]\n(build-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"OMG everything is down!\"}\n  \"email/templates/warning.mustache\" {:name \"Joe\" :host \"host3.megacorp.internal\"})\n\n;;build a message using an HTML template, specify parameter mime type :text/html\n(build-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"OMG everything is down!\"}\n  \"email/templates/warning.html.mustache\" {:name \"Joe\" :host \"host3.megacorp.internal\"} :text/html)\n\n;; build a message using alternative message body, specify alternative plain-text body in addition to main HTML body of the message\n(build-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"Hello!\"}\n             \"templates/html_hello.mustache\" {:name \"Joe\"} :text/html\n             \"templates/hello.mustache\" {:name \"Joe\"} :text/plain)\n\n;; deliver mail, uses *delivery-mode* value to determine how exactly perform the delivery, defaults to :text/plain\n(deliver-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"OMG everything is down!\"}\n  \"email/templates/warning.mustache\" {:name \"Joe\" :host \"host3.megacorp.internal\"})\n\n;; deliver mail, specify html content type\n(deliver-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"OMG everything is down!\"}\n  \"email/templates/warning.html.mustache\" {:name \"Joe\" :host \"host3.megacorp.internal\"} :text/html)\n\n;; deliver mail using alternative message body, specify alternative plain-text body in addition to main HTML body of the message\n(deliver-email {:from \"Joe The Robot\", :to [\"ops@megacorp.internal\" \"oncall@megacorp.internal\"] :subject \"Hello!\"}\n               \"templates/html_hello.mustache\" {:name \"Joe\"} :text/html\n               \"templates/hello.mustache\" {:name \"Joe\"} :text/plain)\n\n;; alter message defaults, for example, From header\n(with-defaults { :from \"Joe The Robot \u003crobot@megacorp.internal\u003e\" :subject \"[Do Not Reply] Warning! Achtung! Внимание!\" }\n  (send-warnings))\n\n;; alter delivery mode (effective for current thread only):\n(with-delivery-mode :smtp\n  (do-something))\n\n;; alter SMTP settings (effective for current thread only, only makes sense for :smtp delivery mode):\n(with-settings { :host \"smtp.megacorp.internal\" }\n  (with-delivery-mode :smtp\n    (do-something-that-delivers-email-over-smtp)))\n\n;; render a template\n(render \"templates/hello.mustache\" {:name \"Joe\"}) ;; =\u003e \"Hello, Joe\"\n```\n\n\n## Community\n\n[Mailer has a mailing list](https://groups.google.com/group/clojure-email). Feel free to join it and ask any questions you may have.\n\nTo subscribe for announcements of releases, important changes and so on, please follow [@ClojureWerkz](https://twitter.com/#!/clojurewerkz) on Twitter.\n\n\n## Supported Clojure versions\n\nMailer requires Clojure 1.6+.\n\n\n## Mailer Is a ClojureWerkz Project\n\nMailer is part of the group of libraries known as ClojureWerkz,\ntogether with [Neocons](http://clojureneo4j.info),\n[Monger](http://clojuremongodb.info),\n[Langohr](http://clojurerabbitmq.info),\n[Elastisch](https://clojureelasticsearch.info),\n[Quartzite](https://github.com/michaelklishin/quartzite) and several\nothers.\n\n\n## Continuous Integration\n\n[![Continuous Integration status](https://secure.travis-ci.org/clojurewerkz/mailer.png)](http://travis-ci.org/clojurewerkz/mailer)\n\nCI is hosted by [travis-ci.org](http://travis-ci.org)\n\n\n## Development\n\nMailer uses [Leiningen 2](https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md). Make sure you have it installed and then run tests\nagainst all supported Clojure versions using\n\n    lein all test\n\nThen create a branch and make your changes on it. Once you are done with your changes and all tests pass, submit\na pull request on Github.\n\n\n\n## License\n\nCopyright © 2012-2017 Michael S. Klishin, Alex Petrov, and the ClojureWerkz team.\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojurewerkz%2Fmailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojurewerkz%2Fmailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojurewerkz%2Fmailer/lists"}