{"id":21767844,"url":"https://github.com/mouday/notifier","last_synced_at":"2026-05-13T07:34:09.616Z","repository":{"id":193816834,"uuid":"689559124","full_name":"mouday/notifier","owner":"mouday","description":"基于Golang的邮件通知服务","archived":false,"fork":false,"pushed_at":"2024-01-26T08:15:15.000Z","size":32,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T02:42:42.076Z","etag":null,"topics":["api","email","golang","web"],"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/mouday.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}},"created_at":"2023-09-10T07:36:39.000Z","updated_at":"2023-12-13T01:57:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed4f82dc-300f-49ae-9b4a-3eb2da7977c9","html_url":"https://github.com/mouday/notifier","commit_stats":null,"previous_names":["mouday/notifier"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouday%2Fnotifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouday%2Fnotifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouday%2Fnotifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouday%2Fnotifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mouday","download_url":"https://codeload.github.com/mouday/notifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745708,"owners_count":20503048,"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":["api","email","golang","web"],"created_at":"2024-11-26T13:30:47.179Z","updated_at":"2026-05-13T07:34:04.597Z","avatar_url":"https://github.com/mouday.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notifier\n\n基于Golang的邮件通知服务\n\n## 使用方式\n\n1、下载适合所在运行平台的二进制文件\n\n[https://github.com/mouday/notifier/releases](https://github.com/mouday/notifier/releases)\n\n2、配置邮件验证信息\n\n```bash\nmv env.example .env\n```\n\n配置说明\n\n```bash\n# == 应用配置 ==\n# 运行模式 debug test release (默认：release)\nGIN_MODE=release\n# 监听端口 (默认：127.0.0.1:8000）\nAPP_RUN_ADDRESS=127.0.0.1:8000\n\n# == 邮件配置 ==\n# 账号\nAPP_EMAIL_USERNAME=admin@163.com\n# 密码\nAPP_EMAIL_PASSWORD=123456\n# 邮件服务地址\nAPP_EMAIL_HOST=smtp.163.com\n# 邮件服务端口号\nAPP_EMAIL_PORT=25\n```\n\n3、启动服务\n\n```bash\n# macos: \n./notifier\n\n# linux: \n./notifier\n\n# windows: \nnotifier.exe\n```\n\n4、调用api接口发送邮件\n\n发送示例\n\n```json\nPOST http://127.0.0.1:8000/sendEmail\ncontent-type: application/json\n\n{\n\t\"to\": [\"123456@qq.com\"],\n\t\"subject\": \"测试邮件标题\",\n\t\"body\": \"测试邮件内容\"\n}\n```\n\n返回响应\n\n```json\n{\n\t\"code\": 0,\n\t\"msg\": \"success\"\n}\n```\n\ncurl命令\n\n```bash\ncurl -H \"Content-Type:application/json\" -X POST -d '{\"to\": [\"123456@qq.com\"], \"subject\": \"测试邮件标题\", \"body\": \"测试邮件内容\"}'http://127.0.0.1:8000/sendEmail\n```\n\n用到的第三方库\n\n- https://github.com/cosmtrek/air\n- https://github.com/subosito/gotenv\n- https://github.com/jordan-wright/email\n- https://github.com/gin-gonic/gin\n\n参考文章\n\n- [使用 GOLANG 发送邮件](https://blog.csdn.net/m0_37322399/article/details/118558600)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouday%2Fnotifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmouday%2Fnotifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouday%2Fnotifier/lists"}