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

SMTPMailer adding ReplyTo in SMTP message header #358

Merged
merged 8 commits into from
Jan 18, 2024

Conversation

riex406
Copy link
Contributor

@riex406 riex406 commented Jan 10, 2024

This is for issue #357.

The reply to address is passed to the SendAysnc method but was not applied to the MimeMessage generated. This should be a non breaking change where if no ReplyTo address is supplied it is not added, while when a ReplyTo message is supplied it is added in the email header appropriately.

I tried making some unit tests but couldn't without adding a lot of extra code or packages.

@jamesmh
Copy link
Owner

jamesmh commented Jan 11, 2024

Love it. If you look at the file Src/UnitTests/MailerUnitTests/Mail/SmtpMailerTests.cs, in the SmtpMailerRenderSucessful test, could you add a call to the fluent method ReplyTo?

This wouldn't test whether the SMTP protocol actually has the reply to field set, but it at least tests the mailable API to ensure it's okay up to the point before the email is actually sent off.

@jamesmh jamesmh self-requested a review January 11, 2024 14:59
@riex406
Copy link
Contributor Author

riex406 commented Jan 11, 2024

I fixed the extra space issue, and I also added another unit test that calls the ReplyTo fluent method.

@jamesmh jamesmh merged commit d703634 into jamesmh:master Jan 18, 2024
4 checks passed
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