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

Derive Clone for mail_send::smtp::message::{Message, Address, Parameters, Parameter}. #33

Merged
merged 1 commit into from
May 5, 2024

Conversation

janis-ab
Copy link
Contributor

@janis-ab janis-ab commented May 3, 2024

At the moment SmtpClient::send takes impl IntoMessage as an argument, thus it takes ownership of a message and in times when message sending fails and it is necessary to retry sending the same message a bit later, it is not possible to do so, because it has been moved.

This is why we #[derive(Clone)] for Message, Address, Parameters, Parameter.

Now it is possible to clone message before sending it. On success we can drop the original, on retry cases we can clone original again, update some parameters and resend.

@mdecimus mdecimus merged commit 4eb4c3a into stalwartlabs:main May 5, 2024
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