Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending duplicates with multiple file attachments #5

Open
glenulmer opened this issue May 5, 2021 · 0 comments
Open

Sending duplicates with multiple file attachments #5

glenulmer opened this issue May 5, 2021 · 0 comments

Comments

@glenulmer
Copy link

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.
email

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant