Re: Re: send2mail transfer protocol
By: Ragnarok to Digital Man on Wed Dec 05 2018 11:56 am
> El 5/12/18 a las 03:22, Digital Man escribió:
> > Re: send2mail transfer protocol
> > By: Ragnarok to All on Tue Dec 04 2018 07:35 pm
>
> > > I'm research to make a idea if possible.
>
> > > I want to write a transfer protocol to send the file via email instead
> > > of download..(i maybe ear previous but i can find if exist)
>
> > > The five step are:
>
> > > 1- The user select the file for download
> > > 2- Select this protocol from list
> > > 3- Prompt for email address
>
> > Why not just use the user's configure email address (user.netmail in JS)?
>
> Done!
>
> > > 4- Generate and send mail with the attach file (or maybe a link to
> > > direct dowload)
> > > 5- Return with "file download ok"
>
> > > I test with a script in javascript and discover that i can use the raw
> > > socket to interact with this session.
>
> > You can, but it'd be better if you didn't. Use the various print methods
> > instead.
>
> Ggood. I test with writeln() and partial works (see below)
>
>
> > > I get the client.socket and write to him socket.send("Give me your
> > > email, please"), this is ok.
>
> > > i now, i think that i must use socket.receiv() the get the user input
>
> > No, use prompt() or console.getstr() or something similar instead.
>
>
> I found a issue here:
> At download session, after use console.getstr() or prompt() to get user
> input, any other methods before (like writeln()) to output string show
> nothing. Do not send the content to the screen or for the syslog.
try using log() to be sure your script is executing the portion you expect.
It could be that while in binary telnet mode, your terminal is sending CR
(instead of CR/LF or CR/Nul) and that's hanging you up.
> At upload session (i'm not support uploads, just only for dedbug
> purposes) any method show nothing output to the user.
>
> Must i set as Native Excecutable to handle i/o? I leave this option as
> NO or Socket I/O enabled?
So long as your command-line is "?module", those options (Native, I/O) have no
effect.
> > > Then, how to return to synch and advertise that the file "was download"
> > > successfully?
>
> > If it's configured as a DSZLOG protocol driver, you need to write to the
> > file with the correct info (and 0 errors) - else, just returning 0
> > indicates successful download.
>
> I test using this method writing the file in the node dir and work.
>
> > > because i get a "the file was not downloaded" error
>
> > Try returning 0 from your script
>
> I try using exit(0) from javascript but sbbs still detect as error
Maybe you had the protocol driver configured as using DSZLOG (but you weren't
writing to the file)?
digital man
Synchronet/BBS Terminology Definition #41:
LF = Line Feed (ASCII 10, Ctrl-J)
Norco, CA WX: 49.1øF, 84.0% humidity, 0 mph WSW wind, 0.13 inches rain/24hrs
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|