https://github.com/genert/pop3
POP3 Client written in Golang - https://www.ietf.org/rfc/rfc1939.txt
https://github.com/genert/pop3
email golang l7 pop3 pop3-client rfc1939
Last synced: 6 months ago
JSON representation
POP3 Client written in Golang - https://www.ietf.org/rfc/rfc1939.txt
- Host: GitHub
- URL: https://github.com/genert/pop3
- Owner: genert
- License: mit
- Created: 2021-03-16T11:57:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-12-14T05:05:00.000Z (7 months ago)
- Last Synced: 2025-12-16T07:17:02.926Z (7 months ago)
- Topics: email, golang, l7, pop3, pop3-client, rfc1939
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# POP3 Client
[](https://codecov.io/gh/genert/pop3)
POP3 Client written in Golang in accordance to [RFC1939](https://www.ietf.org/rfc/rfc1939.txt).
## Usage
### Initialize client
```golang
// Create a connection to the server
c, err := pop3.DialTLS("REPLACE_THIS_SERVER_ADDRESS:993")
if err != nil {
log.Fatal(err)
}
defer c.Quit()
// Authenticate with the server
if err = c.Authorization("REPLACE_THIS_USERNAME", "REPLACE_THIS_PASSWORD"); err != nil {
log.Fatal(err)
}
```
### Commands
```go
// Check if there are any messages to retrieved.
count, _, err := pc.Stat()
if err != nil {
log.Fatal(err)
}
message, err := pc.Retr(1)
if err != nil {
log.Fatal(err)
}
log.Println(message.Text)
log.Println(message.GetHeader("Subject"))
if err := pc.Dele(1); err != nil {
log.Fatal(err)
}
```
## Testing
To run tests, run following command:
```bash
go test -race ./...
```
## Contributions & Issues
Contributions are welcome. Please clearly explain the purpose of the PR and follow the current style.
Issues can be resolved quickest if they are descriptive and include both a reduced test case, and a set of steps to reproduce.
## Licence
The `genert/pop3` library is copyrighted © by [Genert Org](http://genert.org) and licensed for use under the MIT License (MIT).
Please see [MIT License](LICENSE) for more information.