You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this simple code fragment for attachments works fine when there is exactly one attachment. If I send two attachments, which I have verified have different content on the disk, I get an email with two distinctly named attachments, but with the same content as the second file.
for _, a := range attachments {
if len(a) == 0 { continue }
att, e := message.NewAttachment(a)
if e != nil {
Log("Error", a, e)
} else {
basic.Attachments = append(basic.Attachments, att)
Log("Email attached", a)
}
}
globalClient.SendBasic(basic)
When I send 2 files, file 1 sized 117kb and file 2 sized 88.7kb, I get two files correctly named but with the same content.
Notice that in the screenshot of the files attached shows different filenames but with the same thumbnail and they do in face have the same content.
If I create two BasicMessages and build and call them using the two files separately, everything works correctly.
I will look into your code and see if I can find the problem, but I wanted to report this first. Thanks.
The text was updated successfully, but these errors were encountered:
Using this simple code fragment for attachments works fine when there is exactly one attachment. If I send two attachments, which I have verified have different content on the disk, I get an email with two distinctly named attachments, but with the same content as the second file.
When I send 2 files, file 1 sized 117kb and file 2 sized 88.7kb, I get two files correctly named but with the same content.
Notice that in the screenshot of the files attached shows different filenames but with the same thumbnail and they do in face have the same content.
If I create two BasicMessages and build and call them using the two files separately, everything works correctly.
I will look into your code and see if I can find the problem, but I wanted to report this first. Thanks.
The text was updated successfully, but these errors were encountered: