Skip to content

Commit

Permalink
Merge pull request #100 from darkrockmountain/release/v0.6.1
Browse files Browse the repository at this point in the history
Release/v0.6.1
  • Loading branch information
JRocabruna authored Nov 15, 2024
2 parents d22ed5d + d0c8999 commit dad05ed
Show file tree
Hide file tree
Showing 14 changed files with 333 additions and 226 deletions.
6 changes: 3 additions & 3 deletions .examples/serverless/aws_lambda/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/darkrockmountain/gomail/aws_lambda_email_sender

go 1.22.5
go 1.22.7

require (
github.com/aws/aws-lambda-go v1.47.0
github.com/darkrockmountain/gomail v0.6.0-beta
github.com/darkrockmountain/gomail v0.6.0
)

require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/net v0.26.0 // indirect
)
8 changes: 4 additions & 4 deletions .examples/serverless/aws_lambda/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1s
github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/darkrockmountain/gomail v0.6.0-beta h1:vz6ORfGi/n2CgizcDnUTl7qMgUDXiIZeiF3Dl2MVLwc=
github.com/darkrockmountain/gomail v0.6.0-beta/go.mod h1:FAKb0axoZGviKRcuendUZKrwPZCkuXAbWLHrLd+2SS8=
github.com/darkrockmountain/gomail v0.6.0 h1:+sMhklZioO4yUt9C1XyFWrPiMvvBJgKeqHrWcSFdDZg=
github.com/darkrockmountain/gomail v0.6.0/go.mod h1:dRkMbDQarkoevb00ZVlbHGlrDfsr2Z21mpXYFUrjris=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
Expand All @@ -14,7 +14,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6 changes: 3 additions & 3 deletions .examples/serverless/azure_functions/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/darkrockmountain/gomail/azure_email_sender

go 1.22.5
go 1.22.7

require github.com/darkrockmountain/gomail v0.6.0-beta
require github.com/darkrockmountain/gomail v0.6.0

require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/net v0.26.0 // indirect
)
8 changes: 4 additions & 4 deletions .examples/serverless/azure_functions/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/darkrockmountain/gomail v0.6.0-beta h1:vz6ORfGi/n2CgizcDnUTl7qMgUDXiIZeiF3Dl2MVLwc=
github.com/darkrockmountain/gomail v0.6.0-beta/go.mod h1:FAKb0axoZGviKRcuendUZKrwPZCkuXAbWLHrLd+2SS8=
github.com/darkrockmountain/gomail v0.6.0 h1:+sMhklZioO4yUt9C1XyFWrPiMvvBJgKeqHrWcSFdDZg=
github.com/darkrockmountain/gomail v0.6.0/go.mod h1:dRkMbDQarkoevb00ZVlbHGlrDfsr2Z21mpXYFUrjris=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
Expand All @@ -12,7 +12,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/darkrockmountain/gomail/digitalocean_email_sender

go 1.22.5
go 1.22.7

require github.com/darkrockmountain/gomail v0.6.0-beta
require github.com/darkrockmountain/gomail v0.6.0

require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/net v0.26.0 // indirect
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/darkrockmountain/gomail v0.6.0-beta h1:vz6ORfGi/n2CgizcDnUTl7qMgUDXiIZeiF3Dl2MVLwc=
github.com/darkrockmountain/gomail v0.6.0-beta/go.mod h1:FAKb0axoZGviKRcuendUZKrwPZCkuXAbWLHrLd+2SS8=
github.com/darkrockmountain/gomail v0.6.0 h1:+sMhklZioO4yUt9C1XyFWrPiMvvBJgKeqHrWcSFdDZg=
github.com/darkrockmountain/gomail v0.6.0/go.mod h1:dRkMbDQarkoevb00ZVlbHGlrDfsr2Z21mpXYFUrjris=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
Expand All @@ -12,7 +12,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
18 changes: 16 additions & 2 deletions .examples/serverless/google_cloud_functions/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
module github.com/darkrockmountain/gomail/google_cloud_email_sender

go 1.22.5
go 1.22.7

require (
github.com/GoogleCloudPlatform/functions-framework-go v1.8.1
github.com/GoogleCloudPlatform/functions-framework-go v1.9.0
github.com/darkrockmountain/gomail v0.6.0-beta
)

require (
github.com/aymerick/douceur v0.2.0 // indirect
github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/net v0.25.0 // indirect
)
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
## is set as an array of branches to upload to Codecov.
## Example --var CODECOV_BRANCHES='["main", "feature-1"]'
- name: Upload coverage to Codecov
if: ${{ contains(fromJson(vars.CODECOV_BRANCHES), github.ref_name) }}
if: ${{ vars.CODECOV_BRANCHES && contains(fromJson(vars.CODECOV_BRANCHES), github.ref_name) }}
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,111 +1,183 @@
# Changelog

All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

- No changes yet.

## [v0.6.1] - 2024-11-15

### Changed

- **Go Version**: Upgraded to Go `1.22.7` to address the `encoding/gob` vulnerability ([GO-2024-3106](https://pkg.go.dev/vuln/GO-2024-3106)). This resolves potential stack exhaustion issues in `Decoder.Decode` with deeply nested structures.
- **Dependencies**:
- Updated `github.com/aws/aws-sdk-go` from `v1.54.11` to `v1.55.5`.
- Updated `github.com/mailgun/mailgun-go/v4` from `v4.12.0` to `v4.16.0`.
- Updated `golang.org/x/net` from `v0.25.0` to `v0.30.0`.
- Updated `google.golang.org/api` from `v0.186.0` to `v0.200.0`.
- Additional updates to indirect dependencies for compatibility and security.

### Fixed

- **GitHub Actions**: Adjusted the conditional check in `.github/workflows/ci.yml` to ensure compatibility with Codecov branch uploads.

### Refactored

- **Microsoft365 Provider**:
- Updated `SendEmail` function in `microsoft365_email_sender.go` to use `common.EmailMessage` instead of `gomail.EmailMessage`, improving modularity and compatibility.
- **Testing**:
- Enhanced test setup in `microsoft365_email_sender_test.go` by streamlining HTTP client initialization and reducing redundancy.

[v0.6.1]: https://github.com/darkrockmountain/gomail/compare/v0.6.0...v0.6.1

## [v0.6.0] - 2024-07-17

### Added

- SanitizerFunc for input sanitization.
- GitHub Actions workflow optimizations.
- Max size limit for attachments.
- Changed EmailMessage parameter to pointer in EmailSender interface.
- Encapsulated EmailMessage and Attachment structs.

### Changed

- Attachment encoding for Microsoft365.
- Updated Go version to 1.22.5.
- Simplified type aliasing in the gomail package.
- Moved common components to a dedicated directory.
- Separated email providers into individual packages.

### Fixed

- Minor documentation issues.

[v0.6.0]: https://github.com/darkrockmountain/gomail/compare/v0.5.2...v0.6.0

## [v0.5.2] - 2024-06-03

### Added

- Migration of project repository from GitLab to GitHub.
- Automated CI/CD pipeline using GitHub Actions.

### Deprecated

- Deprecated all former versions to avoid issues with the migration.

## [v0.5.1] - 2024-05-30

### Fixed

- Resolved issue with Microsoft365 email sender authentication.

## [v0.5.0] - 2024-01-15

### Changed

- Major refactor of the email sending architecture to support plugin-based providers.

### Added

- Support for SparkPost email provider.
- Enhanced logging functionality.

## [v0.4.1] - 2023-10-10

### Fixed

- Patched security vulnerability in SMTP email sender.

### Added

- Serverless examples.

## [v0.4.0] - 2023-07-22

### Added

- Introduction of the SendGrid email provider.
- Initial support for OAuth2 authentication with Gmail.

## [v0.3.4] - 2023-04-18

### Fixed

- Bug fix in Mailgun email sender related to attachment handling.

## [v0.3.2] - 2023-01-25

### Added

- Feature to track email open and click rates.

## [v0.3.1] - 2022-11-30

### Fixed

- Resolved intermittent issues with Postmark email sender.

## [v0.3.0] - 2022-08-14

### Added

- Support for SES email provider.
- Added retry mechanism for failed email sends.

## [v0.2.1] - 2022-04-12

### Added

- Initial support for Microsoft365 email provider.

## [v0.2.0] - 2021-12-05

### Changed

- Improved error handling across all email providers.

## [v0.1.2] - 2021-09-28

### Fixed

- Fixed a bug in Gmail email sender related to large email bodies.

## [v0.1.1] - 2021-06-15

### Added

- Added support for Mandrill email provider.

## [v0.1.0] - 2021-03-22

### Fixed

- Minor bug fixes and performance improvements.

## [v0.0.3] - 2020-12-10

### Added

- Added support for Mailgun email provider.

## [v0.0.2] - 2020-10-05

### Added

- Added support for Postmark email provider.
- Added detailed logging for email sending failures.

## [v0.0.1] - 2020-05-10

### Added

- Support for Gmail email provider.

## [v0.0.0] - 2020-01-20

### Added

- Initial release with support for SMTP email provider.
10 changes: 5 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

We currently support the following versions with security updates:

| Version | Supported |
| ------- | ------------------ |
| > 0.5.1 | :white_check_mark: |
| <= 0.5.1 | :x: |
| Version | Supported |
| -------- | ------------------ |
| >=0.6.0 | :white_check_mark: |
| <= 0.5.9 | :x: |

## Reporting a Vulnerability

If you discover a security vulnerability, please do the following:

1. **Do not open an issue describing the vulnerability.** This could expose the vulnerability to the public.
1. **Do not open an issue describing the vulnerability.** This could expose the vulnerability to the public.
2. Use GitHub's private vulnerability reporting feature to report the vulnerability directly. You can do this by using Github's [private reporting feature](../../security/advisories/new) of the repository and clicking "Report a vulnerability".
3. Alternatively, you can contact us directly at [security@darkrockmountain.com](mailto:security@darkrockmountain.com) with the following details:
- A description of the vulnerability and its impact.
Expand Down
Loading

0 comments on commit dad05ed

Please sign in to comment.