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

feat: add support for multiple Reply-To addresses #288

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

nolotz
Copy link
Contributor

@nolotz nolotz commented Apr 15, 2023

Hello @jhillyerd and enmime maintainers,

I've been working on a feature enhancement for the enmime library to add support for multiple reply-to addresses, as described in RFC 5322, section 3.6.2. I believe this functionality will improve the flexibility of the library and provide users with the ability to correctly handle multiple reply-to addresses as per the email specification.

Here is a brief overview of the changes I've made in this commit:

  • Updated the MailBuilder struct to store multiple reply-to addresses.
  • Modified the Build function to correctly write multiple reply-to addresses.
  • Updated the GetReplyTo function to return the first email in the list for backward compatibility, and added a new GetReplyToAddrs function to return a slice copy of all addresses.
  • Updated the existing ReplyTo function to support backward compatibility by handling single email addresses while using the new reply-to address list, and added a new ReplyToAddrs function to support setting the whole reply-to list.
  • Added new tests to validate the proper handling of multiple reply-to addresses.

Thank you for your time and consideration. I'm looking forward to your feedback and the opportunity to contribute to this project.

Copy link
Owner

@jhillyerd jhillyerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good idea

builder.go Outdated Show resolved Hide resolved
@jhillyerd jhillyerd merged commit 26de42c into jhillyerd:master Apr 19, 2023
@jhillyerd
Copy link
Owner

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.

3 participants