Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerC authored Aug 28, 2024
2 parents 06ae7bc + 16f25e4 commit dbb9293
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG version=latest
FROM golang:$version
FROM golang:1.21.11

ENV GO111MODULE 'off'

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (C) 2023, Twilio SendGrid, Inc. <[email protected]>
Copyright (C) 2024, Twilio SendGrid, Inc. <[email protected]>

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
Expand Down
2 changes: 1 addition & 1 deletion base_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
7 changes: 7 additions & 0 deletions helpers/mail/mail_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions helpers/mail/mail_v3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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", "[email protected]"),
NewEmail("Example User", "[email protected]"),
}
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()

Expand Down

0 comments on commit dbb9293

Please sign in to comment.