Scott,

I hope I followed your directions properly. Can you help me figure out what is wrong?

I created a program with the following contents (username, password and destination 
address obscured).
======================================
REBOL []

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: "<obscured>"
system/schemes/smtp/pass: "<obscured>"

send [EMAIL PROTECTED] "Rebol mail test"

=======================================

I ran this with trace/net on and got the following response (some host names and IP 
addresses obscured):

>> do %mailer.r
Script: "Untitled" (none)
Net-log: ["Opening" "tcp" "for" "smtp"]
connecting to: <obscured>
Net-log: [none "220"]
Net-log: {220-<obscured> ESMTP Exim 4.24 #1 Wed, 05 May 2004 02:28:10 -0700 }
Net-log: {220-We do not authorize the use of this system to transport unsolicited, }
Net-log: "220 and/or bulk e-mail."
Net-log: [["EHLO" system/network/host] "250"]
Net-log: {250-<obscured> Hello <obscured> [<obscured>]}
Net-log: "250-SIZE 52428800"
Net-log: "250-PIPELINING"
Net-log: "250-AUTH PLAIN LOGIN"
Net-log: "250-STARTTLS"
Net-log: "250 HELP"
Net-log: ["AUTH LOGIN" "334"]
Net-log: "334 <obscured>"
Net-log: [[port/user] "334"]
** User Error: Server error: tcp 501 Invalid base64 data
** Near: smtp-port: open [scheme: 'smtp]
either only


> ------------Original Message------------
> From: "Jones, Scott" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Thu, Apr-29-2004 7:21 PM
> Subject: [REBOL] Re: SMTP Authentication
> 
> 
> From: ML
> > ...
> > Sorry I didn't understand that the scripts were for SMTP 
> > on MS Exchange only. I know my ISP is not using Exchange 
> > servers, so do you think the scripts should still work, 
> > or is there another way to pass username/password to non 
> > Exchange SMTP servers?
> ...
> 
> Hi, Stuart,
> 
> It depends on whether your SMTP server follows the numeric prompt "334" and whether 
> your SMTP server allows plain text authentication or some other method of encoding.  
> This was why I suggested turning "trace/net on" and seeing what the net log says the 
> server is asking.  
> 
> In the meantime you can still try the patch (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"]
> 
> Then try to have the user name and password sent as plain (unencoded) text.  Use 
> this script fragment as one way to set these data:
> 
> view lo: layout [ 
>     text "username" 
>     f: field "username" [ 
>         system/schemes/smtp/user: copy value 
>     ] 
>     text "password" 
>     field hide [ 
>         system/schemes/smtp/pass: copy value
>         unview/all 
>     ] 
>     do [focus f] 
> ] 
> 
> or alternatively in noninteractive script method:
>     system/schemes/smtp/user: "myusername"
>     system/schemes/smtp/pass: "mypassword"
> 
> This fragment sets "system/schemes/smtp/user" to your username, and 
> "system/schemes/smtp/pass" to your password.  Within the SMTP scheme 
> "system/schemes/smtp/user" is represented by the internal path "port/user" and 
> "system/schemes/smtp/pass" is represented by the internal path "port/pass".  So when 
> the SMTP request is being handled and the numeric indicator "334" is detected, the 
> protocol sends first the port/user, and then the port/pass is sent for the second 
> "334".
> 
> If this suggestion does not work, then try at a *fresh* REBOL session turn the 
> "trace/net on".  Then send a test email and make a copy of the net-log, obscuring 
> any sensitive information and paste-ing that to the forum.  If I/we cannot figure it 
> out from that, there is one other way (which I'll avoid explaining from now since I 
> do not believe it will be necessary).
> 
> I hope the plain text authentication works.  If not let me/us know what the net log 
> shows from a fresh REBOL session.
> 
> --Scott Jones
> 
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.
> 
> 
> 
> 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to