File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ options: object [ ; Options supplied to REBOL during startup
65
65
zip: 1
66
66
tar: 1
67
67
]]
68
+ domain-name: none ; Specifies system's domain name (used in SMTP scheme so far)
68
69
]
69
70
70
71
catalog: object [
Original file line number Diff line number Diff line change 4
4
type: module
5
5
author: ["Graham" "Oldes" ]
6
6
rights: BSD
7
- version: 1.0.0
8
- date: 10-May -2022
7
+ version: 1.0.1
8
+ date: 13-Jul -2022
9
9
file: %prot-smtp.reb
10
10
notes: {
11
11
0.0.1 original tested in 2010
@@ -15,6 +15,7 @@ Rebol [
15
15
0.0.5 Changed to move credentials to the url or port specification
16
16
0.0.6 Fixed some bugs in transferring email greater than the buffer size.
17
17
1.0.0 Oldes: Updated to work with my Rebol3 fork; including TLS.
18
+ 1.0.1 Oldes: Using extenal IP in the EHLO message, when domain-name is not available
18
19
19
20
Note that if your password does not work for gmail then you need to
20
21
generate an app password. See https://support.google.com/accounts/answer/185833
@@ -49,7 +50,7 @@ where's my kibble?}]
49
50
host: "smtp.yourisp.com"
50
51
user: "joe"
51
52
pass: "password"
52
- ehlo: "FQDN " ; if you don't have one, then substitute your IP address
53
+ ehlo: "local.domain.name " ; optional, if not available, external IP will be used
53
54
] compose [
54
55
from: me@somewhere.com
55
56
to: recipient@other.com
@@ -404,7 +405,17 @@ sys/make-scheme [
404
405
]
405
406
spec: port/spec
406
407
; create the tcp port and set it to port/state/connection
407
- ; unless system/user/identity/fqdn [throw-smtp-error "Need to provide a value for the system/user/identity/fqdn"]
408
+
409
+ unless spec/ehlo [
410
+ unless spec/ehlo: select system/options 'domain-name [
411
+ try [
412
+ ;; resolve external IP and use it as domain name
413
+ spec/ehlo: read http://ifconfig.me/ip
414
+ ;; and store it for later use
415
+ put system/options 'domain-name : spec/ehlo
416
+ ]
417
+ ]
418
+ ]
408
419
conn : context [
409
420
scheme: none
410
421
host: spec/host
You can’t perform that action at this time.
0 commit comments