{"id":19221194,"url":"https://github.com/gozeloglu/gop-3","last_synced_at":"2025-05-13T01:25:33.355Z","repository":{"id":57626587,"uuid":"399522206","full_name":"gozeloglu/gop-3","owner":"gozeloglu","description":"POP-3 client package for Go.","archived":false,"fork":false,"pushed_at":"2021-10-04T20:29:12.000Z","size":80,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T22:32:32.605Z","etag":null,"topics":["go","golang","mailserver","pop3","pop3-client","pop3-library","pop3-protocol","rfc-1939"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/gozeloglu/gop-3","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/gozeloglu.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}},"created_at":"2021-08-24T15:46:58.000Z","updated_at":"2021-12-25T15:41:57.000Z","dependencies_parsed_at":"2022-08-31T09:12:17.087Z","dependency_job_id":null,"html_url":"https://github.com/gozeloglu/gop-3","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gozeloglu%2Fgop-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gozeloglu%2Fgop-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gozeloglu%2Fgop-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gozeloglu%2Fgop-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gozeloglu","download_url":"https://codeload.github.com/gozeloglu/gop-3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253852287,"owners_count":21973896,"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":["go","golang","mailserver","pop3","pop3-client","pop3-library","pop3-protocol","rfc-1939"],"created_at":"2024-11-09T14:40:25.900Z","updated_at":"2025-05-13T01:25:33.331Z","avatar_url":"https://github.com/gozeloglu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gop-3 [![GoDoc](https://godoc.org/github.com/gozeloglu/gop-3?status.svg)](https://godoc.org/github.com/gozeloglu/gop-3) [![Go Report Card](https://goreportcard.com/badge/github.com/gozeloglu/gop-3)](https://goreportcard.com/report/github.com/gozeloglu/gop-3)  [![Release](https://img.shields.io/badge/Release-v0.2.0-blue)](https://github.com/gozeloglu/gop-3/releases/tag/v0.2.0) ![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/gozeloglu/gop-3?filename=go.mod) [![RFC 1939](https://img.shields.io/badge/Official%20Doc-RFC%201939-yellowgreen)](https://www.ietf.org/rfc/rfc1939.txt) ![LICENSE](https://img.shields.io/badge/license-MIT-green)\n\n### Post Office Protocol - Version 3 (POP3) Go Client\n\nGOP-3 (Go + POP-3) is a POP-3 client for Go. It has experimental purpose and it is still under\ndevelopment. [RFC 1939](https://www.ietf.org/rfc/rfc1939.txt) document has been followed while developing package.\n\n#### Features - Commands\n\n* USER\n* PASS\n* STAT\n* LIST\n* DELE\n* RETR\n* NOOP\n* RSET\n* QUIT\n* TOP\n\n### Installation\n\nYou can download with the following command.\n\n```shell\ngo get github.com/gozeloglu/gop-3\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/gozeloglu/gop-3\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\tpop, err := pop3.Connect(\"mail.pop3.com:110\", nil, false)\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\n\tfmt.Println(pop.GreetingMsg())  // Message starts with \"+OK\"\n\tfmt.Println(pop.IsAuthorized()) // true\n\tfmt.Println(pop.IsEncrypted())  // false\n\n\t// USER command\n\tusername := os.Getenv(\"POP3_USER\") // Read from env\n\tu, err := pop.User(username)\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(u)\n\n\t// PASS command\n\tpassword := os.Getenv(\"POP3_PASSWORD\") // Read from env\n\tpass, err := pop.Pass(password)\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(pass)\n\n\t// STAT command\n\tstat, err := pop.Stat()\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(stat)\n\n\t// LIST command\n\tl, _ := pop.List()\n\tif len(l) == 0 {\n\t\tfmt.Println(l)\n\t}\n\n\t// LIST \u003cmail-num\u003e command\n\tll, _ := pop.List(1)\n\tfmt.Println(ll[0])\n\t\n\t// TOP msgNum n \n\ttop, _ := pop.Top(1, 10)\n\tfmt.Println(top)\n\n\t// DELE command\n\tdele, err := pop.Dele(\"1\")\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(dele)\n\n\t// RETR command \n\tretr, err := pop.Retr(\"1\")\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfor _, m := range retr {\n\t\tfmt.Println(m)\n\t}\n\n\t// NOOP command\n\tnoop, err := pop.Noop()\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(noop)\n\n\t// RSET command\n\trset, err := pop.Rset()\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(rset)\n\n\t// QUIT state\n\tq, err := pop.Quit()\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\tfmt.Println(q) // Prints: \"QUIT\"\n}\n```\n\n### Run \u0026 Test\n\n**Note:** If you run the tests, you firstly need to have a GMail account that enables POP3 connections. Also, you have to\nsave mail address and password in your local environment.\n\nIf you make changes, make sure that all tests are passed. You can run the tests with the following command.\n\n```shell\ngo test pop3/* -v \n```\n\nIf you want to run only one test, you can type the following command.\n\n```shell\ngo test pop3/* -v -run \u003ctest_function_name\u003e\n```\n\nExample:\n\n```shell\ngo test pop3/* -v -run TestStat\n```\n\n### References\n\n* [RFC 1939 POP3](https://www.ietf.org/rfc/rfc1939.txt)\n\n### LICENSE\n\n[MIT](https://github.com/gozeloglu/gop-3/blob/main/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgozeloglu%2Fgop-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgozeloglu%2Fgop-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgozeloglu%2Fgop-3/lists"}