Back to the main page.

Bug 1957 - implement fieldtrip menu option in figures and analysis pipeline

Status ASSIGNED
Reported 2013-01-25 14:22:00 +0100
Modified 2013-01-28 11:51:09 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks: 1565
See also:

Robert Oostenveld - 2013-01-25 14:22:26 +0100

in data figures it should have -> show pipeline -> about in the pipeline figure it should have -> save as -> html/psom/etc. -> share -> send email -> about


Robert Oostenveld - 2013-01-25 14:23:55 +0100

removed utilities/mailto, since it duplicates the standard MATLAB sendmail command. The sendmail function works on all platforms, mailto only worked on linux/mentat. mac001> svn commit mailto.m Deleting mailto.m Committed revision 7408.


Robert Oostenveld - 2013-01-25 14:27:33 +0100

On OSX it does not open the email client, but works like "mail" on the command line. I tried it: >> sendmail('r.oostenveld@example.com','Test subject','Test message') Error using sendmail (line 64) Could not determine SMTP server. You can set one like this: setpref('Internet','SMTP_Server','myserver.myhost.com'); >> setpref('Internet', 'SMTP_Server', 'smtp.ru.nl') >> sendmail('r.oostenveld@example.com','Test subject','Test message') Error using sendmail (line 164) Invalid Addresses; 504 5.5.2 : Sender address rejected: need fully-qualified address >> getpref('Internet') ans = SMTP_Server: 'smtp.ru.nl' E_mail: '' SMTP_Username: '' SMTP_Password: '' >> setpref('Internet', 'E_mail', 'r.oostenveld@example.com') >> sendmail('r.oostenveld@example.com','Test subject','Test message') it works and I receive the email. But it does not offer an option to open the email client with a new email and something already attached. </p>

Robert Oostenveld - 2013-01-25 14:27:39 +0100

there is an interesting thread here http://www.mathworks.com/matlabcentral/newsreader/view_thread/87309


Robert Oostenveld - 2013-01-25 14:34:47 +0100

(In reply to comment #3) The previous link gives the ActiveX solution for windows. On http://matlab.izmiran.ru/help/techdoc/matlab_env/command4.html I found "On Macintosh platforms, you cannot run AppleScript directly from MATLAB. However, you can run the Macintosh OS X osascript function from the MATLAB unix or ! (bang) function to run AppleScript from MATLAB." I think that with applescript it should be possible to tell mail to open a new message with attachment. How about linux? Or should we implement our own platform independent MATLAB function that opens a figure with three "edit" gui elements for "to", "subject" and "message" and then pass the user-specified content into sendmail?


Eelke Spaak - 2013-01-25 14:58:17 +0100

For opening the user's mail client, how about using the mailto: URL protocol? You can specify stuff like so mailto:robert@example.com?subject=hoi&body=blablabla . On most machines, this should launch the mail client. I don't know if we can work with attachments through this mechanism though.


Robert Oostenveld - 2013-01-28 11:51:09 +0100

(In reply to comment #5) >> web('mailto:r.oostenveld@example.com') works nicely on OS X. However as suggested here http://forums.devshed.com/beginner-programming-16/using-mailto-with-an-attachment-66699.html and http://stackoverflow.com/questions/3019547/is-it-possible-to-add-a-attachment-to-a-mail-with-the-mailto-function-in-actions >> web('mailto:r.oostenveld@example.com?attachment=file://etc/host') does not include the attachment. This http://ftp.ics.uci.edu/pub/ietf/uri/rfc2368.txt explains that it is not standard. One comment in http://stackoverflow.com/questions/6029579/start-mail-client-with-attachment/6093765#6093765 suggests to create an EML file (http://www.coolutils.com/Formats/EML). But it also does not seem to work, as it opens the eml file read-only, i.e. not "to send". --- if we would upload the html, then we can do something like >> web('mailto:r.oostenveld@example.com?subject=''cool website''&body=http://tinyurl.com/a68fv32') So an option would be share -> 1) upload to web share -> 2) send as email with the only difference that 2) would upload and then compose the email, whereas 1 only uploads. But how about security? E.g. http://blog.insicdesigns.com/2009/01/secure-file-upload-in-php-web-applications. What if the javascript in the uploaded html were to be malicious?