You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Flatten the email config
This commit is contained in:
@ -92,10 +92,13 @@ impl Transport {
|
||||
|
||||
/// Construct a Sendmail transport
|
||||
#[must_use]
|
||||
pub fn sendmail(command: impl Into<OsString>) -> Self {
|
||||
Self::new(TransportInner::Sendmail(
|
||||
AsyncSendmailTransport::new_with_command(command),
|
||||
))
|
||||
pub fn sendmail(command: Option<impl Into<OsString>>) -> Self {
|
||||
let transport = if let Some(command) = command {
|
||||
AsyncSendmailTransport::new_with_command(command)
|
||||
} else {
|
||||
AsyncSendmailTransport::new()
|
||||
};
|
||||
Self::new(TransportInner::Sendmail(transport))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user