Allow sending custom SMTP commands
amaury1093 opened this issue · 0 comments
amaury1093 commented
In my project, I need to send custom SMTP commands to test the deliverability of an email. Here's an example of sending the RCTP command, now using lettre:
https://github.com/amaurymartiny/check-if-email-exists/blob/0679acc81e0a0d111e2a4db5d9bd6c64e92b7900/core/src/smtp.rs#L128-L132
As far as I understand, in async-smtp, I can either just send all the commands that are needed to send an email.
I propose to have an additional pub method in impl SmtpTransport
:
pub async fn command(&mut self, command) {
let mut client = Pin::new(&mut self.client);
client
.as_mut()
.command(command))
}
If you're okay with that I'll add a PR