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)?
> 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.
> 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.
> 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.
> because i get a "the file was not downloaded" error
Try returning 0 from your script.
> i need to know how to implement the step 3 and 5 basically
File attachments in email could be interesting... I can't think of any easy
examples, but I'd start with exec/sendmail.js.
digital man
Synchronet/BBS Terminology Definition #30:
FTS = FidoNet Technical Standard
Norco, CA WX: 52.5øF, 32.0% humidity, 0 mph W wind, 0.00 inches rain/24hrs
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|