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

Preserve the From and To names in from/to #1

Merged
merged 1 commit into from
Nov 10, 2018
Merged

Preserve the From and To names in from/to #1

merged 1 commit into from
Nov 10, 2018

Conversation

hdm
Copy link
Contributor

@hdm hdm commented Nov 10, 2018

This PR prevents the names in the From/To fields from being stripped. The code in question:

	mm := new(smail.SGMailV3)
	mm.SetFrom(smail.NewEmail("", m.From))
	mm.Subject = m.Subject

	p := smail.NewPersonalization()
	for _, to := range m.To {
		p.AddTos(smail.NewEmail("", to))
	}

This update uses net/mail's parser to preserve the name field for From/To.

@paganotoni
Copy link
Owner

Thanks @hdm !

@paganotoni paganotoni merged commit 2e00eec into paganotoni:master Nov 10, 2018
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