diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index 2cc7bc6e..9a0f0113 100644 --- a/modules/programs/neomutt.nix +++ b/modules/programs/neomutt.nix @@ -111,7 +111,9 @@ let } else let smtpProto = if smtp.tls.enable then "smtps" else "smtp"; - smtpBaseUrl = "${smtpProto}://${escape userName}@${smtp.host}"; + smtpPort = if smtp.port != null then ":${smtp.port}" else ""; + smtpBaseUrl = + "${smtpProto}://${escape userName}@${smtp.host}${smtpPort}"; in { smtp_url = "'${smtpBaseUrl}'"; smtp_pass = "'`${passCmd}`'";