In windows there is the posibility of making right click on a file and choose send to ->
email or other destinations
I will like to know if it is possible to make felamimail to work with this. This could be configured placiong a simple .bat in the C:\documents and settings\username\Send to folder to make the action (ie email with egroupware) the .bat should contain a call to felamimail passing the attachment as a parameter, so the question is:
Is there any url that could be used for this, a url that calls the felamimail compose action passing one attachment?
http(s)://your.server/egroupware/index.php?menuaction=felamimail.uicompose.compose&preset[bcc]=info+alpha-zet+<info%40alpha-zet.de>&preset[subject]=AAAAAAAAAAAAAAA&preset[body]… and so on
this is just for better reading, please keep in mind that all special chars should be url save encoded to avoid running in trouble.
For getting more information about which other variables you can use for the get request I suggest a look in \egroupware\felamimail\inc\class.uicompose.inc.php at function: function compose($_focusElement=‘to’)
…search for the $_REQUEST[‘preset’][‘yxz’]…
and now happy “batching”, and I wouldn’t mind if you posted your tries or maybe positiv results ;-).
note, that the upload of files via preset will not work for php/HTML
security restrictions.
as you cannot (or I was not able to find out how) preset the input window
for the upload.
(I tried about a year ago)
…and what about using a tool like netdrive pointing for example to something /home/user/mail-attachments and give the attachment-preset the vfs location?
(and of course make the batch file doing the job of copying to the netdrive before
Its something the upload dialog prohibits. If you use netdrive, files
located there are regarded that they
are local files of yours.
If you hand over a url, you may alter the code to read the content of the
url pointing to, and
dump that locally, (or find out that you already have it,) and attach it
then.
bofelamimail->addAttachment would be the place to look for, as it evaluates
if the file is readable and in temp
or directly with its own vfs.
But you may as well have to fiddle with uicompose-> compose, as the preset
file is checked for readability
Just one question, What is the difference into passing the file to upload using the windows form (when composing a new mail) or to pass the path as a url parameter?
both situations pass a local file to the function that really attach the file to the email (or pass the path to this file), or does the form transform the file or uuencode it, or something?
The idea of this is that this should be used with files anywhere in your computer, and not in vfs as the end user wants to be in a document, or be in a folder and select and send the file directly
The idea is clear. No question about that.
The difference is security. It is build in in the upload dialog of HTML.
If you sit in front of your computer, and click to select the files, it is
made sure, thatyou see what yolu do.
If you where able to upload files by script, any bad script could use it to
upload files to whatever location,
without you knowing it.
Ok, I understood, but if this upload by script is limited to upload to the compose window without the possibility to specify the TO or CC or BCC , so is not possible to code a malicious script without the user be presented with the compose form with the attachment and the subject populated, but waiting for a TO to be entered and a send to be clicked
The restriction is build into the HTML upload Dialog. There is no other way
known to me to bring a local file
on a users computer into the reach of the webserver running at another
location.
If you are able to build your own upload dialog, thats fine for you.
If you find a way. go ahead.