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.
At the moment
SmtpClient::send
takesimpl 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.