You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let _ = write!(file,"username:[email protected]\npassword:password123123\n\n### The username is your gmail account ([email protected])\n### The password is a 'password for apps' created in Google\n## NOTICE: To create an app-password, you have to have 2-step verification\n## enabled and maybe all rescue options of saving the account.").map_err(|e| e.to_string());
27
-
panic!("\n\nThe config has any valid information! Please check it out in config/smtp_account.txt!\n\n");
36
+
setup_wizard();
28
37
},
29
38
_ => {}
30
39
}
31
40
}
32
41
}
33
42
Ok(())
34
43
}
44
+
45
+
pubfnsetup_wizard(){
46
+
letmut iter:u8 = 1;
47
+
letmut smtp_account_username = String::new();
48
+
letmut smtp_account_password = String::new();
49
+
50
+
loop{
51
+
match iter {
52
+
1 => {
53
+
println!("Enter your smtp account username:");
54
+
},
55
+
2 => {
56
+
println!("Can you confirm your smtp account username (Y or N)?");
57
+
},
58
+
3 => {
59
+
println!("Enter your smtp account password:");
60
+
},
61
+
4 => {
62
+
println!("Can you confirm your smtp account password (Y or N)?");
63
+
},
64
+
_ => ()
65
+
}
66
+
let input = read_line();
67
+
match iter {
68
+
1 => {
69
+
println!("You have entered \"{}\" as your smtp account username", input);
70
+
smtp_account_username = input.clone();
71
+
iter += 1;
72
+
},
73
+
2 => {
74
+
if input.to_lowercase() == "y"{
75
+
iter += 1;
76
+
}
77
+
else{
78
+
iter = 1
79
+
}
80
+
},
81
+
3 => {
82
+
println!("You have entered \"{}\" as your smtp account password", input);
0 commit comments