https://github.com/nrdcg/mailinabox
Go library for accessing the Mail-in-a-Box API
https://github.com/nrdcg/mailinabox
api-client dns-client go golang mailinabox mailinabox-api
Last synced: 4 days ago
JSON representation
Go library for accessing the Mail-in-a-Box API
- Host: GitHub
- URL: https://github.com/nrdcg/mailinabox
- Owner: nrdcg
- License: mpl-2.0
- Created: 2024-02-11T18:39:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-12T01:31:14.000Z (about 1 year ago)
- Last Synced: 2025-03-26T17:24:26.874Z (3 months ago)
- Topics: api-client, dns-client, go, golang, mailinabox, mailinabox-api
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Go library for accessing the Mail-in-a-Box API
[](https://github.com/nrdcg/mailinabox/actions/workflows/main.yml)
[](https://pkg.go.dev/github.com/nrdcg/mailinabox)
[](https://goreportcard.com/report/github.com/nrdcg/mailinabox)A Mail-in-a-Box API client written in Go.
`mailinabox` is a Go client library for accessing the Mail-in-a-Box API.
## Examples
```go
package mainimport (
"context"
"fmt""github.com/nrdcg/mailinabox"
)func main() {
client, err := mailinabox.NewClient("https://example.com", "[email protected]", "secret")
if err != nil {
panic(err)
}record := mailinabox.Record{
Name: "example.com",
Type: "A",
Value: "10.0.0.1",
}resp, err := client.DNS.AddRecord(context.Background(), record)
if err != nil {
panic(err)
}fmt.Println(resp)
}
``````go
package mailinabox_testimport (
"context"
"fmt""github.com/nrdcg/mailinabox"
)func main() {
client, err := mailinabox.NewClient("https://example.com", "[email protected]", "secret")
if err != nil {
panic(err)
}resp, err := client.System.Reboot(context.Background())
if err != nil {
panic(err)
}fmt.Println(resp)
}
```## API Documentation
- [API docs](https://mailinabox.email/api-docs.html)
## Supported APIs
- [x] User API
- [x] Mail API
- [x] DNS API
- [ ] SSL API
- [ ] Web API
- [ ] MFA API
- [x] System API