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

Fix "mail: no address" on send due to non-empty address slice. #6

Merged
merged 1 commit into from
Jan 24, 2020

Conversation

stephenhyde
Copy link
Contributor

@stephenhyde stephenhyde commented Aug 8, 2018

Since the bcc, cc, to are string maps, it will default the get to a string slice of 1 item of empty string. This will fail the parse address on the send route.

to := m.Header.To()
cc := m.Header.Cc()
bcc := m.Header.Bcc()
all := make([]string, 0, len(to)+len(cc)+len(bcc))

Regardless of empty cc, bcc, or to, this all will default to a minimum of 3 items.

this will cause "address, err := mail.ParseAddress(all[i])" to return an err as all[i] will be of empty string.

@stephenhyde
Copy link
Contributor Author

@veqryn

@veqryn veqryn merged commit a72ac14 into veqryn:master Jan 24, 2020
@veqryn
Copy link
Owner

veqryn commented Jan 24, 2020

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

Successfully merging this pull request may close these issues.

2 participants