{"id":19692338,"url":"https://github.com/root27/go-mail","last_synced_at":"2026-05-14T15:36:33.258Z","repository":{"id":213712001,"uuid":"734672391","full_name":"root27/go-mail","owner":"root27","description":"https://pkg.go.dev/github.com/root27/go-mail","archived":false,"fork":false,"pushed_at":"2023-12-22T14:48:33.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T11:47:13.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/root27.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}},"created_at":"2023-12-22T09:49:29.000Z","updated_at":"2023-12-23T18:10:56.000Z","dependencies_parsed_at":"2023-12-22T16:02:06.205Z","dependency_job_id":"986f5ac0-42ff-4cf4-811b-06f834d24fa4","html_url":"https://github.com/root27/go-mail","commit_stats":null,"previous_names":["root27/go-mail"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/root27/go-mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root27%2Fgo-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root27%2Fgo-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root27%2Fgo-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root27%2Fgo-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/root27","download_url":"https://codeload.github.com/root27/go-mail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/root27%2Fgo-mail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33031317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":"2024-11-11T19:13:02.357Z","updated_at":"2026-05-14T15:36:33.235Z","avatar_url":"https://github.com/root27.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Email Package\n\nSimple send email package for Go.\n\n## Installation\n\n```bash\n\ngo get github.com/root27/go-mail\n\n```\n\n## Functions\n\n- Send Email with text\n\nThis function only sends text emails. You can find usage and details of the function below.\n\n\n```go\n\nfunc Send(host string, from string, passKey string, to string, subject string, body string) error\n\n```\n\n### Example\n\n```go\n\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/root27/go-mail\"\n)\nfunc main(){\n\thost := \"HOST NAME\" // e.g gmail, yandex\n\n\tfrom := \"MAIL ADDRESS FROM WHICH YOU WILL SEND\"\n\n\tto := \"MAIL ADDRESS TO WHICH YOU WILL SEND\"\n\n\t//PASSKEY IS THE KEY OF THE MAIL ADDRESS FROM WHICH YOU WILL SEND\n\n\tsubject := \"test\"\n\n\tmessage := \"Hello World\"\n\n\terr := mail.Send(host, from, \"YOUR PASSKEY\", to, subject, message)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(\"Mail sent successfully\")\n\n}\n\n```\n\n- Send Email with html template\n\nThis function sends html emails. You can find usage and details of the function below.\n\n```go\n\nfunc SendWithHtml(host string, from string, passKey string, to string, subject string, htmlTemplate string) error\n\n```\n\n### Example\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\n\tmail \"github.com/root27/go-mail\"\n)\n\nfunc main() {\n\n\thost := \"HOST NAME\" // e.g gmail, yandex\n\n\tfrom := \"MAIL ADDRESS FROM WHICH YOU WILL SEND\"\n\n\tto := \"MAIL ADDRESS TO WHICH YOU WILL SEND\"\n\n\t//PASSKEY IS THE KEY OF THE MAIL ADDRESS FROM WHICH YOU WILL SEND\n\n\tsubject := \"Html test\"\n\n\thtmlPath := \"Path of the html file\"\n\n\terr := mail.SendWithHtml(host, from, \"YOUR PASSKEY\", to, subject, htmlPath)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(\"Mail sent successfully\")\n\n}\n\n```\n\n- Send Email with html template and variables\n\nThis function sends html emails with variables. If you have any variables in your html template, you can use this function. You can find usage and details of the function below.\n\n```go\n\nfunc SendHtmlWithVariables(host string, from string, passKey string, to string, subject string, htmlTemplate string, variables interface{}) error\n\n```\n\n### Example\n\n```go\n\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/root27/go-mail\"\n)\n\nfunc main() {\n\n\thost := \"HOST NAME\" // e.g gmail, yandex\n\n\tfrom := \"MAIL ADDRESS FROM WHICH YOU WILL SEND\"\n\n\tto := \"MAIL ADDRESS TO WHICH YOU WILL SEND\"\n\n\t//PASSKEY IS THE KEY OF THE MAIL ADDRESS FROM WHICH YOU WILL SEND\n\n\tsubject := \"Variable Test\"\n\n\n\thtmlPath := \"Path of the html file\"\n\n\tdata := struct {\n\t\tName string\n\t\tAge  int\n\t}{\n\t\tName: \"Oğuzhan\",\n\t\tAge:  21,\n\t}\n\n\terr := mail.SendHtmlWithVariables(host, from, \"YOUR PASSKEY\", to, subject, htmlPath, data)\n\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tlog.Printf(\"Mail sent successfully\")\n\n}\n\n```\n\nLICENSE\n\n[MIT](./LICENSE)\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot27%2Fgo-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froot27%2Fgo-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froot27%2Fgo-mail/lists"}