@@ -7,7 +7,8 @@ pub struct RawCryptifyConfig {
77 email_from : String ,
88 smtp_url : String ,
99 smtp_port : u16 ,
10- smtp_credentials : Option < ( String , String ) > ,
10+ smtp_username : Option < String > ,
11+ smtp_password : Option < String > ,
1112 smtp_tls : Option < bool > ,
1213 allowed_origins : String ,
1314 pkg_url : String ,
@@ -21,7 +22,8 @@ pub struct CryptifyConfig {
2122 email_from : lettre:: message:: Mailbox ,
2223 smtp_url : String ,
2324 smtp_port : u16 ,
24- smtp_credentials : Option < ( String , String ) > ,
25+ smtp_username : Option < String > ,
26+ smtp_password : Option < String > ,
2527 smtp_tls : bool ,
2628 allowed_origins : String ,
2729 pkg_url : String ,
@@ -38,7 +40,8 @@ impl From<RawCryptifyConfig> for CryptifyConfig {
3840 } ) ,
3941 smtp_url : config. smtp_url ,
4042 smtp_port : config. smtp_port ,
41- smtp_credentials : config. smtp_credentials ,
43+ smtp_username : config. smtp_username ,
44+ smtp_password : config. smtp_password ,
4245 smtp_tls : config. smtp_tls . unwrap_or ( true ) ,
4346 allowed_origins : config. allowed_origins ,
4447 pkg_url : config. pkg_url ,
@@ -67,8 +70,12 @@ impl CryptifyConfig {
6770 self . smtp_port
6871 }
6972
70- pub fn smtp_credentials ( & self ) -> Option < & ( String , String ) > {
71- self . smtp_credentials . as_ref ( )
73+ pub fn smtp_username ( & self ) -> Option < & str > {
74+ self . smtp_username . as_deref ( )
75+ }
76+
77+ pub fn smtp_password ( & self ) -> Option < & str > {
78+ self . smtp_password . as_deref ( )
7279 }
7380
7481 pub fn smtp_tls ( & self ) -> bool {
0 commit comments