{"id":15567974,"url":"https://github.com/circa10a/go-mailform","last_synced_at":"2025-10-02T23:34:25.184Z","repository":{"id":61627886,"uuid":"548561184","full_name":"circa10a/go-mailform","owner":"circa10a","description":"A small library to send physical mail from your Go applications using https://mailform.io","archived":false,"fork":false,"pushed_at":"2023-01-17T14:25:02.000Z","size":24,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-10T22:53:22.135Z","etag":null,"topics":["go","go-library","golang","hacktoberfest","mail"],"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/circa10a.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":"2022-10-09T20:23:58.000Z","updated_at":"2023-02-22T12:02:26.000Z","dependencies_parsed_at":"2023-02-10T10:00:26.570Z","dependency_job_id":null,"html_url":"https://github.com/circa10a/go-mailform","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Fgo-mailform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Fgo-mailform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Fgo-mailform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circa10a%2Fgo-mailform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circa10a","download_url":"https://codeload.github.com/circa10a/go-mailform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235049019,"owners_count":18927715,"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","go-library","golang","hacktoberfest","mail"],"created_at":"2024-10-02T17:14:01.338Z","updated_at":"2025-10-02T23:34:24.818Z","avatar_url":"https://github.com/circa10a.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-mailform\n\n![GitHub tag (latest semver)](https://img.shields.io/github/v/tag/circa10a/go-mailform?style=plastic)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/circa10a/go-mailform)](https://pkg.go.dev/github.com/circa10a/go-mailform?tab=overview)\n[![Go Report Card](https://goreportcard.com/badge/github.com/circa10a/go-mailform)](https://goreportcard.com/report/github.com/circa10a/go-mailform)\n\nA small library to send physical mail from your Go applications using https://mailform.io\n\n## Usage\n\nFirst you will need an API Token from [mailform.io](https://mailform.io)\n\n```bash\ngo get github.com/circa10a/go-mailform\n```\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/circa10a/go-mailform\"\n)\n\nfunc main() {\n\tclient, err := mailform.New(\u0026mailform.Config{\n\t\tToken: \"MAILFORM_API_TOKEN\",\n\t})\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\t// Create order\n\t// You can send a PDF file via local filesystem path or a URL.\n\t// FilePath will take precedence over URL.\n\torder, err := client.CreateOrder(mailform.OrderInput{\n\t\t// Send local pdf\n\t\tFilePath: \"./sample.pdf\",\n\t\t// Or you can send the file via URL\n\t\tURL: \"http://s3.amazonaws.com/some-bucket/sample.pdf\",\n\t\t// Shipping service options:\n\t\t// FEDEX_OVERNIGHT USPS_PRIORITY_EXPRESS USPS_PRIORITY USPS_CERTIFIED_PHYSICAL_RECEIPT USPS_CERTIFIED_RECEIPT USPS_CERTIFIED USPS_FIRST_CLASS USPS_STANDARD USPS_POSTCARD\n\t\tService:      \"USPS_PRIORITY\",\n\t\tToName:       \"A Name\",\n\t\tToAddress1:   \"Address 1\",\n\t\tToCity:       \"Seattle\",\n\t\tToState:      \"WA\",\n\t\tToPostcode:   \"00000\",\n\t\tToCountry:    \"US\",\n\t\tFromName:     \"My Name\",\n\t\tFromAddress1: \"My Address 1\",\n\t\tFromCity:     \"Dallas\",\n\t\tFromState:    \"TX\",\n\t\tFromPostcode: \"00000\",\n\t\tFromCountry:  \"US\",\n\t})\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\tos.Exit(1)\n\t}\n\n\tfmt.Println(\"Order ID\", order.Data.ID)\n\n\t// Get Order\n\torderDetails, err := client.GetOrder(order.Data.ID)\n\tif err != nil {\n\t\tfmt.Println(err)\n\t\tos.Exit(1)\n\t}\n\n\tfmt.Println(orderDetails.Data)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirca10a%2Fgo-mailform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcirca10a%2Fgo-mailform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcirca10a%2Fgo-mailform/lists"}