1
- ## Email Service Configuration
1
+ # Email Service Configuration
2
2
3
3
The MailService provides email functionality using SMTP protocol. It supports:
4
4
5
5
- Account activation emails
6
6
- Password reset emails
7
7
- Welcome emails
8
8
9
- ### Configuration Options
9
+ ## Configuration Options
10
10
11
11
Configure email settings in ` appsettings.json ` :
12
12
@@ -31,14 +31,14 @@ Configure email settings in `appsettings.json`:
31
31
}
32
32
```
33
33
34
- #### Development Configuration
34
+ ### Development Configuration
35
35
36
36
For local development, you can use:
37
37
38
38
- [ MailHog] ( https://github.com/mailhog/MailHog ) - Recommended for Mac/Linux
39
39
- [ Papercut SMTP] ( https://github.com/ChangemakerStudios/Papercut-SMTP ) - Windows alternative
40
40
41
- #### Production Configuration
41
+ ### Production Configuration
42
42
43
43
Common SMTP providers:
44
44
@@ -59,7 +59,7 @@ Common SMTP providers:
59
59
}
60
60
```
61
61
62
- ### Usage Examples
62
+ ## Usage Examples
63
63
64
64
1 . Activation Email:
65
65
@@ -90,7 +90,7 @@ await _mailService.SendCreationEmail(
90
90
);
91
91
```
92
92
93
- ### Security Best Practices
93
+ ## Security Best Practices
94
94
95
95
1 . ** SMTP Security**
96
96
@@ -115,7 +115,7 @@ await _mailService.SendCreationEmail(
115
115
- Log delivery failures with correlation IDs
116
116
- Monitor bounce rates and spam reports
117
117
118
- ### Testing
118
+ ## Testing
119
119
120
120
1 . Unit Testing:
121
121
@@ -153,7 +153,7 @@ public async Task Should_Connect_To_SMTP_Server()
153
153
}
154
154
```
155
155
156
- ### Troubleshooting Guide
156
+ ## Troubleshooting Guide
157
157
158
158
1 . ** Connection Issues**
159
159
- Verify network connectivity to SMTP server
@@ -170,7 +170,7 @@ public async Task Should_Connect_To_SMTP_Server()
170
170
- Monitor email logs for bounce reasons
171
171
- Verify recipient address format
172
172
173
- ### Dependencies
173
+ ## Dependencies
174
174
175
175
- ** MailKit** : SMTP client library
176
176
``` xml
@@ -181,7 +181,7 @@ public async Task Should_Connect_To_SMTP_Server()
181
181
<PackageReference Include =" MimeKit" Version =" 4.1.0" />
182
182
```
183
183
184
- ### Additional Resources
184
+ ## Additional Resources
185
185
186
186
- [ JHipster Email Configuration Guide] ( https://www.jhipster.tech/tips/011_tip_configuring_email_in_jhipster.html )
187
187
- [ MailKit Documentation] ( https://github.com/jstedfast/MailKit#documentation )
0 commit comments