Commit 0261417
committed
feat(email): improve SMTP configuration with flexible port and secure mode handling
- Change SmtpConfig.Port from int to nullable int? with PortValue property for default fallback
- Add SecureMode property to SmtpConfig for string-based SSL/TLS mode representation
- Refactor EmailService connection logic to align with nodemailer's secure mode semantics
- Update SecureSocketOptions selection: use SslOnConnect for secure=true, StartTls for secure=false with port 587
- Replace SmtpSecure boolean with SmtpSecureMode string property in ConfigViewModel
- Add SmtpSecureModeIndex and SmtpSecureModeDescription computed properties for UI binding
- Update ConfigPage UI to use ComboBox for secure mode selection instead of CheckBox
- Improve SMTP connection handling to support both implicit SSL (465) and STARTTLS (587) patterns
- Maintain backward compatibility by defaulting Port to 587 when null1 parent 5dcd822 commit 0261417
4 files changed
Lines changed: 87 additions & 29 deletions
File tree
- Models
- Services
- ViewModels
- Views/Pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
145 | 158 | | |
146 | 159 | | |
147 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | | - | |
235 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
236 | 262 | | |
237 | 263 | | |
238 | 264 | | |
| |||
463 | 489 | | |
464 | 490 | | |
465 | 491 | | |
466 | | - | |
467 | | - | |
| 492 | + | |
| 493 | + | |
468 | 494 | | |
469 | 495 | | |
470 | 496 | | |
| |||
492 | 518 | | |
493 | 519 | | |
494 | 520 | | |
495 | | - | |
496 | | - | |
| 521 | + | |
| 522 | + | |
497 | 523 | | |
498 | 524 | | |
499 | 525 | | |
| |||
542 | 568 | | |
543 | 569 | | |
544 | 570 | | |
545 | | - | |
546 | | - | |
| 571 | + | |
| 572 | + | |
547 | 573 | | |
548 | 574 | | |
549 | 575 | | |
| |||
600 | 626 | | |
601 | 627 | | |
602 | 628 | | |
603 | | - | |
604 | | - | |
| 629 | + | |
| 630 | + | |
605 | 631 | | |
606 | 632 | | |
607 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
166 | 175 | | |
167 | 176 | | |
168 | 177 | | |
| |||
0 commit comments