File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,13 @@ sync-smtp-handler: function [event][
135
135
]
136
136
connect [
137
137
smtp-port/state: 'EHLO
138
- read client
138
+ either state = 'STARTTLS [
139
+ sys/log/more 'SMTP "TLS connection established..."
140
+ write smtp-ctx/connection to binary! net-log/C ajoin ["EHLO " spec/ehlo CRLF]
141
+ smtp-port/state: 'AUTH
142
+ ][
143
+ read client
144
+ ]
139
145
false
140
146
]
141
147
@@ -210,21 +216,12 @@ sync-smtp-handler: function [event][
210
216
211
217
STARTTLS [
212
218
if code = 220 [
213
- ;- Upgrading client's connection to TLS port
219
+ sys /log/more 'SMTP " Upgrading client's connection to TLS port"
214
220
;; tls-port will be a new layer between existing smtp and client (tcp) connections
215
- ;? client
216
- ;? smtp-port
217
221
tls-port: open [scheme: 'tls conn: client]
218
222
tls-port/parent: smtp-port
219
223
client/parent: tls-port
220
- sys/log/more 'SMTP "TLS connection established..."
221
- ;? tls-port
222
- ;? client
223
- ;? client/parent
224
- ;? client/extra/tls-port
225
- smtp-port/extra/connection: client/extra/tls-port
226
- write tls-port to binary! net-log/C ajoin ["EHLO " spec/ehlo CRLF]
227
- smtp-port/state: 'AUTH
224
+ smtp-ctx/connection: client/extra/tls-port
228
225
return false
229
226
]
230
227
]
You can’t perform that action at this time.
0 commit comments