This is an old revision of the document!
Email Files as Attachments
This module provides a file transfer “download protocol” that sends the requested file(s) as attachments to the user at their desired email address.
Your Synchronet Mail Server (SendMail thread) must be operational for this module to work as expected.
Install
Make sure SCFG->Networks->Internet E-mail->Allow Sending of E-mail and Allow File Attachments are both set to “Yes” (otherwise, this module will only function for sysops).
╔══════════════════════════════════════════════════════════╗ ║ Internet E-mail ║ ╠══════════════════════════════════════════════════════════╣ ║ │System Address yourbbs.synchro.net ║ ║ │Inbound E-mail Semaphore ║ ║ │Outbound E-mail Semaphore ║ ->│Allow Sending of E-mail Yes <- ║ ->│Allow File Attachments Yes <- ║ ║ │Send E-mail Using Alias No ║ ║ │Kill E-mail After Sent No ║ ║ │Cost to Send E-mail 0 ║ ╚══════════════════════════════════════════════════════════╝
Automated installation using JSexec:
jsexec emailfiles -install
After this, users should see “E-mail Attachment” as a download protocol option and you will find in SCFG->File Options->Transfer Protocols:
╔════════════════════════════════════════════════════════════════════╗ ║ File Transfer Protocol ║ ╠════════════════════════════════════════════════════════════════════╣ ║ │Mnemonic (Command Key) E ║ ║ │Protocol Name E-mail Attachment ║ ║ │Access Requirements REST NOT M ║ ║ │Upload Command Line ║ ║ │Download Command Line ?emailfiles %f ║ ║ │Batch Upload Command Line ║ ║ │Batch Download Command Line ?emailfiles +%f ║ ║ │Bi-dir Command Line ║ ║ │Native Executable/Script Yes ║ ║ │Supports DSZLOG Yes ║ ║ │Socket I/O No ║ ╚════════════════════════════════════════════════════════════════════╝
Users with the 'M' (networked mail) restriction will not be provided this download option due to the default Access Requirements (which you can change).
Configure
To change the default behavior, create or edit the file ctrl/modopts.d/emailfiles.ini
:
- emailfiles.ini
; Options for "E-mail files as attachments" module ; Uncomment and modify values to over-ride defaults [emailfiles] ; maxfiles = 10 ; maxfilesize = 10485760 ; maxpending = 104857600 ; prompt: "\x01h\x01yE-mail address: " ; badaddr: "Unsupported e-mail address" ; msgbody: "Your requested file (%u of %u) is attached." ; success: "Successfully attached: %s"
Note: Sysops are not limited by the default/configured maximum files/size/pending.