[REBOL] Re: Another question about the 'send' function
From: Gary:Jones:usap:gov at: 11-Aug-2004 13:17
Behalf Of Steffen Pedersen
> My internetprovider wants me to use "asmpt"
> when sending email. (Instead of "smpt").
> For security reasons. This means I have to
> provide "username" and "password" when
> establishing contact to the "outgoing mailserver".
> ...
> But, how do I do this in the Rebol send-function?
Hi, Steffen,
The ease with which this can be done may depend on which
SMTP server your provider is using. The most common
request has been for Microsoft's Exchange server which
may be set to its extended SMTP mode requiring encoded
authentication. The following patch should work for that
server (watch for line wrap):
system/schemes/smtp/handler/open-check: [none "220"
["EHLO" system/network/host] "250" "AUTH LOGIN"
"334" [port/user] "334" [port/pass] "235"]
system/schemes/smtp/user: copy enbase/base myusername 64
system/schemes/smtp/pass: copy enbase/base mypassword 64
;...in which myusername and mypassword are set appropriately
This method alters the current running copy of the protocol
scheme that manages the SMTP connection. It tests with
the extended HELO command, "EHLO", for the extended SMTP
command set. Exchange frequently uses the "AUTH LOGIN" for
encoded authentication. The script looks for this option
and then offers the base 64 encoded version of the username
and password. E-mail is then sent using the standard 'SEND
command.
However, there is no standardization of extended SMTP, and
so many varieties exists. In theory, there is a work around
for many or most; however, the list ran into one 3 months
back that used a variety of SSL that did not have an "easy"
work around.
If the above script fragment does not work, there is a way
for you to find out more about your SMTP server, if you are
adventurous and you have the TELNET client software (most
machines do).
Let us know what you find.
--Scott Jones