Basically emails are sent as plain text messages over the Internet. If a file (image, document etc.) is emailed, this file is sent as message attachment. Febooti Command line email utility allows to send email attachments in any preferred way, be them single or many, full folder content or just part of it.
febootimail -ATTACH image.jpg
febootimail -ATTACH *.doc -ATTACH 20??-file.gif
febootimail -FILE document.doc -ATTACH "C:\my music\music.mp3"
febootimail -FILE "image.jpg | C:\my music\music.mp3 | data.txt"
-ATTACH or -FILE switch specifies which files will be added to message when sending email from command line. If attachment file path is not specified, attachments are taken from the folder in which Febootimail is executed.
Since Febooti Command line email version 3.0 it is possible to use file masks (e.g. "*.*" or "files*.jp?") with -ATTACH (or -FILE) parameter thus cancelling the need for batch files.
Pay attention that if spaces are used either in file name or folder name, expression has to be put in quotes. If many files are sent, -ATTACH switch must be repeated before each file or separate filenames by using | (pipe).
C:\>febootimail -SERVER smtp.server.com -FROM firstname.lastname@example.org -TO email@example.com -ATTACH "c:\My Presentations\presentation.ppt | c:\terms\terms.txt" -TEXT DOS mailing out presentation and term files as attachments
Text files can be sent out either as plain message or as attachment. In the latter case text file formatting will not be interpreted arbitrary by email clients, so that it is useful to send text files as attachments if every byte has to be preserved as is.
C:\>febootimail *other mail parameters* -ATTACH plaintextfile.txt -TEXT "send e-mail from DOS with text file attachment"
If many files are to be sent as attachments with command line mail utility, it is most convenient to create batch file.
rem send all files as attachments. one attach per email...
for %%i in (*.*) do Febootimail *other params* -ATTACH %%i
Note that (*.*) stands for file mask where (*.*) means that all files will be sent as attachments. If (*.doc) is used, all files with extension .doc will be sent. If (??-dec*.d?c) is specified, only files that have "-dec" in their names as 3rd to 6th characted and extension that starts with "d" and ends with "c" (with 2nd character being any) are to be sent.
Also, note that in example above every file is sent as separate email. If all files have to be attached to single email message, use the batch files from example given below.
rem this is batch file - do.bat
rem will call batch file - send.bat
cmd /v /c send.bat
rem /v - delayed environment variable expansion
rem /c carries out the command specified by string
rem Call this file from Windows 2000 / XP / 2003 / Vista
rem batch file - send.bat must be called from file do.bat
rem Gathering all files in current folder with mask specified...
dir *.doc /A-D /B > tmp
rem Expand environment variable attach as long as needed...
for /F "tokens=*" %%i in (tmp) do set attach=!attach! -ATTACH %%i
rem Send all files / attachments in single email...
febootimail <standard params excluding -ATTACH> %ATTACH%
rem Cleaning temporary file...
Please do not hesitate to contact our support department with any possible further questions or to solve practical issues connected with Command line email.