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

Header Unfolding & SetAddressList formatting #6

Merged
merged 3 commits into from
Apr 6, 2023
Merged

Header Unfolding & SetAddressList formatting #6

merged 3 commits into from
Apr 6, 2023

Conversation

d--j
Copy link
Owner

@d--j d--j commented Apr 6, 2023

Add UnfoldedValue() method that returns the unfolded version of a header value.

mail.ParseAddressList cannot handle folded header values so the AddressList() methods would return errors for perfectly valid address lists (that had newlines in them).

While we are at it, we also change the formatting of address lists to encode them as multi-line header fields (one address per line).

d--j added 3 commits April 6, 2023 01:31
The old version did not work in modules outside github.com/d--j/go-milter
if the MTA supports it (Sendmail does not) all Header().SetAddressList() and Header().Fields().SetAddressList() calls now set the address list as multi-line header - one address per line.
@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 85.318% (+0.08%) from 85.234% when pulling 71519ee on header into d568301 on main.

@d--j d--j merged commit 9cbe82f into main Apr 6, 2023
@d--j d--j deleted the header branch April 6, 2023 12:21
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