Closed fubarhouse closed 5 years ago
For us it corresponds with the real world scenario:
The "to" names reported from https://github.com/blueimp/aws-smtp-relay/blob/master/internal/relay/relay.go#L50-L57 looks ok
{"Time":"2019-05-01T00:54:56.66669728Z","IP":"10.1.32.1","From":"source@email.com","To":["dest1@email.com","dest2@email.com"],"Error":""}
but when it gets to the send step, and creates "destinations" - we see the second address twice in the AWS Kinesis log
"destination": ["dest2@email.com", "dest2@email.com"],
Is there a safer way to assemble the destinations in https://github.com/blueimp/aws-smtp-relay/blob/master/internal/relay/relay.go#L58-L61 ?
Karl's test replicates this
Thank you! 🎉
Wow! Perfect!
Thanks for the report @fubarhouse and @tobybellwood!
That was actually a very embarrassing bug in the destination handling.
The previous code iterated over the list of recipients assigning to a local variable.
However since ses.SendRawEmailInput
expects a list of string references (instead of a list of strings), passing in the local variable effectively set all destinations to the last one in the iteration.
Thanks again for letting me know. ☺️
Thank you for being so prompt!
You're welcome!
I just moved from Germany to Tokyo, so we're effectively in the same timezone now and I can potentially respond quicker. 🇯🇵🇦🇺
I spent an embarrassing amount of hours poring through logs (in S3 via Kinesis - thanks to #2!) before I discovered the issue!
Could I please get some advice on the following issue which I've come across?
I've been brought an issue and tried to reproduce the problems in the test suite you've provided with this module/binary. Note that the changes simply adapt the existing test to support multi-value to fields with checks against those values as the existing check only checked the first value.
Code changes
Console output
Observations
input
correctly.