diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index f447a23c..da0a2bc2 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -42,6 +42,11 @@ jobs: echo "GOBIN=$HOME/bin" >> $GITHUB_ENV echo "GO111MODULE=off" >> $GITHUB_ENV + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose + - name: Run Tests run: make test-docker diff --git a/CHANGELOG.md b/CHANGELOG.md index fe962665..ad1db81f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # Change Log All notable changes to this project will be documented in this file. +[2024-08-26] Version 3.16.0 +--------------------------- +**Library - Chore** +- [PR #479](https://github.com/sendgrid/sendgrid-go/pull/479): updates for manual release. Thanks to [@sbansla](https://github.com/sbansla)! +- [PR #477](https://github.com/sendgrid/sendgrid-go/pull/477): fixed failed test cases due to go upgrade. Thanks to [@sbansla](https://github.com/sbansla)! + +**Library - Feature** +- [PR #471](https://github.com/sendgrid/sendgrid-go/pull/471): add mail_v3 functionality for reply_to_list. Thanks to [@lopezator](https://github.com/lopezator)! + + +[2024-08-08] Version 3.15.0 +--------------------------- +**Library - Feature** +- [PR #471](https://github.com/sendgrid/sendgrid-go/pull/471): add mail_v3 functionality for reply_to_list + + [2023-12-01] Version 3.14.0 --------------------------- **Library - Chore** diff --git a/Dockerfile b/Dockerfile index 09f21116..5b17ca24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -ARG version=latest -FROM golang:$version +FROM golang:1.21.11 ENV GO111MODULE 'off' diff --git a/LICENSE b/LICENSE index 3154774a..d703157e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2023, Twilio SendGrid, Inc. +Copyright (C) 2024, Twilio SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/base_interface.go b/base_interface.go index f9c0d609..6fdaf3cf 100644 --- a/base_interface.go +++ b/base_interface.go @@ -15,7 +15,7 @@ import ( // Version is this client library's current version const ( - Version = "3.14.0" + Version = "3.16.0" rateLimitRetry = 5 rateLimitSleep = 1100 ) diff --git a/helpers/mail/mail_v3.go b/helpers/mail/mail_v3.go index 7cbb3701..201a0138 100644 --- a/helpers/mail/mail_v3.go +++ b/helpers/mail/mail_v3.go @@ -37,6 +37,7 @@ type SGMailV3 struct { MailSettings *MailSettings `json:"mail_settings,omitempty"` TrackingSettings *TrackingSettings `json:"tracking_settings,omitempty"` ReplyTo *Email `json:"reply_to,omitempty"` + ReplyToList []*Email `json:"reply_to_list,omitempty"` } // Personalization holds mail body struct @@ -239,6 +240,12 @@ func (s *SGMailV3) SetReplyTo(e *Email) *SGMailV3 { return s } +// SetReplyToList ... +func (s *SGMailV3) SetReplyToList(e []*Email) *SGMailV3 { + s.ReplyToList = e + return s +} + // SetTemplateID ... func (s *SGMailV3) SetTemplateID(templateID string) *SGMailV3 { s.TemplateID = templateID diff --git a/helpers/mail/mail_v3_test.go b/helpers/mail/mail_v3_test.go index 40139ca2..f7794320 100644 --- a/helpers/mail/mail_v3_test.go +++ b/helpers/mail/mail_v3_test.go @@ -96,6 +96,17 @@ func TestV3SetReplyTo(t *testing.T) { assert.Equal(t, address, m.ReplyTo.Address, fmt.Sprintf("address should be %s, got %s", address, e.Address)) } +func TestV3SetReplyToList(t *testing.T) { + m := NewV3Mail() + replyTos := []*Email{ + NewEmail("Example User", "test@example.com"), + NewEmail("Example User", "test@example.com"), + } + m.SetReplyToList(replyTos) + + assert.Equal(t, len(replyTos), len(m.ReplyToList), fmt.Sprintf("length of To should be %d, got %d", len(replyTos), len(m.ReplyToList))) +} + func TestV3SetTemplateID(t *testing.T) { m := NewV3Mail()