feat!: Email support using lettre#419
Conversation
Initial commit of email.rs using lettre Initial commit of Add email support using lettre crate Added the message printout if debug mode is enabled Added a test and deferred the extra headers and attachment features. Added tests for config and send_email(ignore).
…/cot into feat-add-email-support
…ded to improve test coverage.
m4tx
left a comment
There was a problem hiding this comment.
I think this is the last batch of comments - overall, it's really, really good, but I still have a few concerns. Nothing fundamental, mostly nitpicks!
cot/src/email.rs
Outdated
| type Error = EmailMessageError; | ||
|
|
||
| fn try_from(message: EmailMessage) -> Result<Self, Self::Error> { | ||
| let from_mailbox = message |
There was a problem hiding this comment.
Why can't we just add server_email: Option<String> to EmailConfig? What do you mean "there's no nice way to do that"?
Co-authored-by: Mateusz Maćkowski <mateusz@mackowski.org>
seqre
left a comment
There was a problem hiding this comment.
Good work, last few changes and I'll gladly approve!
...i/tests/snapshot_testing/new/snapshots/cli__snapshot_testing__new__create_new_project-5.snap
Outdated
Show resolved
Hide resolved
seqre
left a comment
There was a problem hiding this comment.
One nitpick, but otherwise it LGTM!
.github/workflows/rust.yml
Outdated
| CI: true | ||
| SCCACHE_GHA_ENABLED: true | ||
| RUSTC_WRAPPER: sccache | ||
| RUST_NIGHTLY_VERSION: nightly-2025-11-11 |
There was a problem hiding this comment.
nit: please add comment why we pinned the nigthly
There was a problem hiding this comment.
@ElijahAhianyo, was it specific CI breakage you mean or general too many breakages so you pinned it?
There was a problem hiding this comment.
I remember there were a number of gneral breakages but the one that prompted pinning the nightly version was this linker error here: https://github.com/cot-rs/cot/actions/runs/20366889103/job/58529733940?pr=419.
I could also try to bump it to today to see if everything works fine
594807a to
3936515
Compare
m4tx
left a comment
There was a problem hiding this comment.
This is great, great job! Thank you so much for this; there's a lot of work put in there both by you and the original author, @trkelly23!
Pretty much everything is good! I've left a few very nitpicky comments that will make this even better (mostly just auto-commitable suggestions); we can merge this as soon as these are fixed!
| #[cfg(feature = "email")] | ||
| self.email | ||
| .clone() | ||
| .unwrap_or_else(|| Email::new(Console::new())), |
There was a problem hiding this comment.
Eventually we might want to replace this with a transport that is capable of reading sent emails (so that you can assert things in tests), but the Console transport is good enough for now.
This is a continuation of #250
fixes #184