{"id":25253336,"url":"https://github.com/mailpace/gomailpace","last_synced_at":"2025-04-05T22:29:59.310Z","repository":{"id":215515264,"uuid":"739136244","full_name":"mailpace/gomailpace","owner":"mailpace","description":"A Go package for interacting with the MailPace API for sending emails.","archived":false,"fork":false,"pushed_at":"2024-01-17T14:49:26.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T04:59:01.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mailpace.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":"2024-01-04T21:21:36.000Z","updated_at":"2024-01-07T15:15:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"52d46950-4e21-4511-a886-62df615777dd","html_url":"https://github.com/mailpace/gomailpace","commit_stats":null,"previous_names":["mailpace/gomailpace"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailpace%2Fgomailpace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailpace%2Fgomailpace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailpace%2Fgomailpace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailpace%2Fgomailpace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mailpace","download_url":"https://codeload.github.com/mailpace/gomailpace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411240,"owners_count":20934650,"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":[],"created_at":"2025-02-12T04:59:03.560Z","updated_at":"2025-04-05T22:29:59.289Z","avatar_url":"https://github.com/mailpace.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoMailpace\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/mailpace/gomailpace)](https://pkg.go.dev/github.com/mailpace/gomailpace)\n[![GoReport](https://goreportcard.com/badge/github.com/mailpace/gomailpace)](http://goreportcard.com/report/mailpace/gomailpace)\n[![Build Status](https://circleci.com/gh/mailpace/gomailpace.svg?style=svg)](https://circleci.com/gh/mailpace/gomailpace)\n[![Coverage Status](https://codecov.io/gh/mailpace/gomailpace/graph/badge.svg?token=7FP4G7OLY5)](https://codecov.io/gh/mailpace/gomailpace)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/mailpace/gomailpace)](https://golang.org/doc/go-get-installation)\n[![GitHub release](https://img.shields.io/github/release/mailpace/gomailpace.svg)](https://github.com/mailpace/gomailpace/releases)\n\nThis Go package provides a client for interacting with the MailPace API for sending emails.\n\n## Installation\n\nTo use this package in your Go project, you can import it using the following:\n\n```go\nimport \"github.com/mailpace/gomailpace\"\nimport \"context\"\n```\n\n## Usage\n\n### Creating a GoMailpace Client\n\n```go\nemailClient := gomailpace.NewClient(\"MAILPACE_TOKEN\")\n```\n\nReplace \"MAILPACE_TOKEN\" with your actual MailPace API token.\n\n### Sending an Email\n\n```go\nemailPayload := gomailpace.Payload{\n    From:     \"service@example.com\",\n    To:       \"user@example.com\",\n    Subject:  \"MailPace Rocks!\",\n    TextBody: \"MailPace is the best transactional email provider out there\",\n}\n\nctx := context.Background() // You can use context to handle request cancellation, deadlines etc.\nerr := emailClient.Send(ctx, emailPayload)\nif err != nil {\n    // handle err\n}\n```\n\n\n### Additional Options\n\nYou can include various options such as HTML body, CC, BCC, attachments, tags, etc. as specified in the MailPace API documentation: https://docs.mailpace.com/reference/send \n\n```go\nemailPayload := gomailpace.Payload{\n    From:        \"service@example.com\",\n    To:          \"user@example.com\",\n    Subject:     \"MailPace Rocks!\",\n    HTMLBody:    \"\u003chtml\u003e\u003cbody\u003e\u003cp\u003eContent\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\",\n    CC:          \"cc@example.com\",\n    Attachments: []gomailpace.Attachment{\n        {\n            Name:        \"attachment.jpg\",\n            Content:     \"base64_encoded_string_here\",\n            ContentType: \"image/jpeg\",\n        },\n    },\n    Tags: []string{\"password reset\", \"welcome\"},\n}\n\n```\n\n## Running Tests\n\nTo run the unit tests for this package, use the following command:\n\n```bash\ngo test\n```\n\n## Contributions\n\nFeel free to contribute to this project by opening issues or submitting pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailpace%2Fgomailpace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailpace%2Fgomailpace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailpace%2Fgomailpace/lists"}