Back to the main page.

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

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
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('','Test subject','Test message') Error using sendmail (line 64) Could not determine SMTP server. You can set one like this: setpref('Internet','SMTP_Server',''); >> setpref('Internet', 'SMTP_Server', '') >> sendmail('','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: '' E_mail: '' SMTP_Username: '' SMTP_Password: '' >> setpref('Internet', 'E_mail', '') >> sendmail('','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

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

(In reply to comment #3) The previous link gives the ActiveX solution for windows. On 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 . 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('') works nicely on OS X. However as suggested here and >> web('') does not include the attachment. This explains that it is not standard. One comment in suggests to create an EML file ( 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('''cool website''&body=') 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. What if the javascript in the uploaded html were to be malicious?