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
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.
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
Then, how to return to synch and advertise that the file "was download" successfully? because i get a "the file was not downloaded" error
i need to know how to implement the step 3 and 5 basically
any info or doc i'll be very grearful!
thanks!
Saludos!
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
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.
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
Then, how to return to synch and advertise that the file "was download" successfully?
because i get a "the file was not downloaded" error
i need to know how to implement the step 3 and 5 basically
On 12-04-18 22:22, Digital Man wrote to Ragnarok <=-
Why not just use the user's configure email address (user.netmail in
JS)?
File attachments in email could be interesting... I can't think of any easy examples, but I'd start with exec/sendmail.js.
On 12-04-18 19:35, Ragnarok wrote to All <=-
3- Prompt for email address
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.
I get the client.socket and write to him socket.send("Give me your
email, please"), this is ok.
On 12-04-18 19:35, Ragnarok wrote to All <=-
3- Prompt for email address
What would be better and less prone to abuse would be to use the user's email address as stors in their user record. Also means no extra prompting needed.
4- Generate and send mail with the attach file (or maybe a link to direct dowload)
5- Return with "file download ok"
Doable.
I test with a script in javascript and discover that i can use the raw socket to interact with this session.
I get the client.socket and write to him socket.send("Give me your email, please"), this is ok.
As I said, what about reading the user's email from their recor
On 12-04-18 22:22, Digital Man wrote to Ragnarok <=-
Why not just use the user's configure email address (user.netmail in JS)?
You read my mind! :)
File attachments in email could be interesting... I can't think of any easy examples, but I'd start with exec/sendmail.js.
You'd need to MIME encode the file, for inclusion in the message. Can Synchronet do this or is this something that has to be done externally?
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.
On 12-04-18 22:22, Digital Man wrote to Ragnarok <=-
Why not just use the user's configure email address (user.netmail in JS)?
You read my mind! :)
File attachments in email could be interesting... I can't think of any easy examples, but I'd start with exec/sendmail.js.
You'd need to MIME encode the file, for inclusion in the message. Can Synchronet do this or is this something that has to be done externally?
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.
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?
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
On 12-05-18 09:05, Ragnarok wrote to Tony Langdon <=-
As I said, what about reading the user's email from their recor
Yes of course, it's a option too.
On 12-05-18 12:02, Ragnarok wrote to Tony Langdon <=-
You'd need to MIME encode the file, for inclusion in the message. Can Synchronet do this or is this something that has to be done externally?
i test using external mail program (mutt) i hope that synchonet will supported it asap.
On 12-05-18 13:21, Digital Man wrote to Tony Langdon <=-
The Synchronet mail server will MIME-encode file attachments automatically.
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.
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.
So long as your command-line is "?module", those options (Native, I/O) have no effect.
Maybe you had the protocol driver configured as using DSZLOG (but you weren't writing to the file)?
Re: Re: send2mail transfer protocol
By: Digital Man to Ragnarok on Wed Dec 05 2018 13:28:52
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.
Yes i use log() en several points and work fine
example
log("one");
writeln("two");
log("three");
one an three are send to syslog, but two wont show =|
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.
how to change it? mus i use telnet_mode() or telnet_cmd() ?
So long as your command-line is "?module", those options (Native, I/O) have no effect.
okay my command are configured as ?module
Maybe you had the protocol driver configured as using DSZLOG (but you weren't writing to the file)?
if i understand, if was configure as use DSZLOG the return code are omited?
and if use DSZLOG are disabled, it check for return code?
On 12-05-18 12:02, Ragnarok wrote to Tony Langdon <=-
You'd need to MIME encode the file, for inclusion in the message. Can Synchronet do this or is this something that has to be done externally?
nice.i test using external mail program (mutt) i hope that synchonet will supported it asap.
Oh, OK. Yeah a Synchronet (JS) based email "transfer protocol" would be
On 12-06-18 10:20, Ragnarok wrote to Tony Langdon <=-
Oh, OK. Yeah a Synchronet (JS) based email "transfer protocol" would be
nice.
i'm working on it:
ftp://bbs.docksud.com.ar/dsmailer.js
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)?
On 12-09-18 13:09, mark lewis wrote to Digital Man <=-
what if there isn't one? should it query and store it or just query and use it this one time?
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 28 |
Nodes: | 8 (0 / 8) |
Uptime: | 125:27:53 |
Calls: | 1,998 |
Calls today: | 2 |
Files: | 11,111 |
Messages: | 943,011 |