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
{{ message }}
This repository was archived by the owner on May 25, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: guide/docs/server.md
+47-22Lines changed: 47 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,25 +32,48 @@ ___
32
32
33
33
## Optional Configuration
34
34
35
-
-`maxRecipients` The maximum amount of recipients the server accepts per message.
36
-
```kotlin
37
-
maxRecipients =4000// (default is 1000)
38
-
```
39
-
40
-
-`maxConnections` The maximum amount of connections the server allows at once.
41
-
```kotlin
42
-
maxConnections =2000// (default is 1000)
43
-
```
44
-
45
-
-`prefferedMaxMessageSize` The maximum size of a message. This won't be enforced, this is just an information for the connected client.
46
-
```kotlin
47
-
prefferedMaxMessageSize =8000// (default is null)
48
-
```
49
-
50
-
-`connectionTimeout` The timeout for waiting for data on a connection.
51
-
```kotlin
52
-
connectionTimeout =2 to TimeUnit.MINUTES// (default is 1 minute)
53
-
```
35
+
#### Configuration variables
36
+
37
+
Inside the SMTP server builder, you have access to the following configuration variables:
38
+
39
+
<table>
40
+
<thead>
41
+
<tr>
42
+
<th>Option</th>
43
+
<th>Description</th>
44
+
</tr>
45
+
</thead>
46
+
<tbody>
47
+
<tr>
48
+
<td><b>maxRecipients</b></td>
49
+
<td>
50
+
The maximum amount of recipients the server accepts per message. <br> <i>default</i> = <code>1000</code>
51
+
</td>
52
+
</tr>
53
+
<tr>
54
+
<td><b>maxConnections</b></td>
55
+
<td>
56
+
The maximum amount of connections the server allows at once. <br> <i>default</i> = <code>1000</code>
57
+
</td>
58
+
</tr>
59
+
<tr>
60
+
<td><b>prefferedMaxMessageSize</b></td>
61
+
<td>
62
+
The maximum size of a message. This won't be enforced, this is just an information for the connected client. <br> <i>default</i> = <code>null</code> (no limit)
63
+
</td>
64
+
</tr>
65
+
<tr>
66
+
<td><b>connectionTimeout</b></td>
67
+
<td>
68
+
The maximum size of a message. This <i>won't be enforced</i>, this is just an information for the connected client. <br> <i>default</i> = <code>1 to TimeUnit.MINUTES</code> (1 minute) <br><br>
69
+
The best way to set this is the following
70
+
```kotlin
71
+
connectionTimeout = 2 to TimeUnit.MINUTES
72
+
```
73
+
</td>
74
+
</tr>
75
+
</tbody>
76
+
</table>
54
77
55
78
#### TLS (Secure connections)
56
79
@@ -60,6 +83,8 @@ Go to the dedicated [TLS page](tls.md) for more details.
60
83
61
84
With listeners, you can receive and **process emails**.
62
85
86
+
### Commands
87
+
63
88
#### Mail (easiest)
64
89
65
90
Listen to the `DATA` command (called last, therefore has the most information):
@@ -104,7 +129,7 @@ recipientListener {
104
129
}
105
130
```
106
131
107
-
#####Reject Connections
132
+
### Reject Connections
108
133
109
134
You can reject connections after receiving any command. Both functions have parameters for a custom reponse and status code.
110
135
```kotlin
@@ -114,9 +139,9 @@ it.reject()
114
139
it.dropConnection()
115
140
```
116
141
117
-
##### Common
142
+
###MessageContext
118
143
119
-
You can do the following inside every callback:
144
+
The context gives you more information about the current connection.
0 commit comments