{"id":44953669,"url":"https://github.com/0xdeface/h2s","last_synced_at":"2026-02-18T11:14:45.784Z","repository":{"id":49356447,"uuid":"517467808","full_name":"0xdeface/h2s","owner":"0xdeface","description":"h2s is small service for sending email messages. Work with it is very simply.","archived":false,"fork":false,"pushed_at":"2022-07-26T05:36:39.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T13:29:46.666Z","etag":null,"topics":["http","smtp"],"latest_commit_sha":null,"homepage":"","language":"Go","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/0xdeface.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}},"created_at":"2022-07-25T00:20:41.000Z","updated_at":"2022-07-25T05:51:32.000Z","dependencies_parsed_at":"2022-08-26T07:10:59.908Z","dependency_job_id":null,"html_url":"https://github.com/0xdeface/h2s","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/0xdeface/h2s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeface%2Fh2s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeface%2Fh2s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeface%2Fh2s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeface%2Fh2s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xdeface","download_url":"https://codeload.github.com/0xdeface/h2s/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xdeface%2Fh2s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29576992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["http","smtp"],"created_at":"2026-02-18T11:14:45.090Z","updated_at":"2026-02-18T11:14:45.779Z","avatar_url":"https://github.com/0xdeface.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# H2S [http to smtp]\n\n[![Go](https://github.com/0xdeface/h2s/actions/workflows/go.yml/badge.svg)](https://github.com/0xdeface/h2s/actions/workflows/go.yml)\n\n## Description\n\nh2s is small service for sending email messages. Work with it is very simply.   \nH2S do render html template with your own data and send it to recipient.   \n**First:** Put your template inside `tpls` folder. _H2S support go template syntax._  \n**Second:** Make http post query with payload to endpoint.\n\n### Required env variables\n\n```\nSMTP_HOST \nSMTP_PORT \nSMTP_SSL \nSMTP_TSL \nSMTP_USERNAME \nSMTP_PASSWORD\n```\n\nAdditionally, you can set HTTP_PORT variable, if not set default is \":8090\". This variable is responsible for the port\nlistening port.\n\n### Required payload fields\n\n```\n{\n\"templateName\": \"target_template.html\",\n\"data\" : \"data for you template\",\n\"subject\" : \"email subject\",\n\"to\" :[\"array of recipients\",]\n\"from\" : \"email from\"\n}\n```\n\n### Endpoints\n\n/send [POST] - synchronous rendering html and sending to recipient   \n/send-async [POST] - asynchronous returning uuid of job  \n/result?uuid=\u003cYOUR UUID OF REQUEST\u003e [GET] - returning result previously added job /test - returning rendered template\nwithout sending smtp message\n\n## Usage\n\nRun service ./h2s   \nSend request. Example with curl bellow\n\n```\ncurl localhost:8090/send --data '{\"templateName\":\"ecommerce.html\", \"data\":{\"name\":\"test1\", \"sum\":\"4584\", \"order\":\"d-12323\", \"products\":[{\"name\":\"LG TV sdfdsfdsfsdf\", \"price\": \"777.0\", \"quantity\":\"44\", \"sum\":\"3434 руб\"},{\"name\":\"Product 2 lololo\", \"price\":\"343434\", \"quantity\":\"dsfsdfsdf\", \"sum\":\"sdfsdf\"}]}, \"from\":\"sender@rix.ru\", \"to\":[\"recipent.khv@gmail.com\"],\"subject\":\"Интернет заказ в магазине\"}'\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdeface%2Fh2s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xdeface%2Fh2s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xdeface%2Fh2s/lists"}