Can MATLAB send a Mac email?

  • Follow


The subject line pretty much says it all.  Is there a way to get MATLAB to send an email using the Mac mail program?
0
Reply the 7/8/2010 1:20:24 PM

"the cyclist" <thecyclist@gmail.com> wrote in message <i14jan$gdq$1@fred.mathworks.com>...
> The subject line pretty much says it all.  Is there a way to get MATLAB to send an email using the Mac mail program?

You can access OS X's Action Script using the "osascript" unix command. Just call that from Matlab. I don't have a Mac handy to test this atm, but it should be easy enough.
0
Reply Joshua 7/8/2010 2:16:23 PM


Dear Cyclist,

> The subject line pretty much says it all.  Is there a way to get MATLAB to send an email using the Mac mail program?

I assume, that this depends on the possibility to control the Apple program "mail" remotely. Perhaps an Apple newsgroup has more detailed knowledge.
Does SENDMAIL help you?

Jan
0
Reply Jan 7/8/2010 2:33:05 PM

In article <i14jan$gdq$1@fred.mathworks.com>,
 "the cyclist" <thecyclist@gmail.com> wrote:

> The subject line pretty much says it all.  Is there a way to get MATLAB to 
> send an email using the Mac mail program?

Yes, as Joshua said, use osascript to run an AppleScript.  The script 
might look something like

tell application "Mail"
   set msg to make new outgoing message with properties {visible:true, 
subject:"demo", content:"body of email"}
   tell msg
      make new to recipient with properties {name:"John Doe", 
address:"jdoe@whatever.com"}
   end tell
   send msg
end tell


(This may be wrapped.)

-- 
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.
0
Reply Doug 7/10/2010 1:10:43 PM

3 Replies
246 Views

(page loaded in 1.699 seconds)

Similiar Articles:













7/23/2012 6:51:54 AM


Reply: