How to call Mail.App to quick write a mail?
-
- Earned some good credits
- Posts: 110
- Joined: Fri Mar 31, 2006 6:05 am
-
- I live to help wx-kind
- Posts: 194
- Joined: Mon Aug 30, 2004 1:26 pm
- Location: PA, USA
- Contact:
There are two answers:
#1: Ignore Mail.app and send the message directly, using wxSMTP
#2: Figure out how to do it via AppleScript, then (call that AppleScript somehow)
Both of these are non-trivial. The first is non-trivial because, well, SMTP. The second is non-trivial because, well, AppleScript isn't necessarily an obvious language, and calling AppleScripts from wxWidgets would require some Dive Into the Mac OS "Carbon" routines yourself.
But, these should point you in the right direction.
#1: Ignore Mail.app and send the message directly, using wxSMTP
#2: Figure out how to do it via AppleScript, then (call that AppleScript somehow)
Both of these are non-trivial. The first is non-trivial because, well, SMTP. The second is non-trivial because, well, AppleScript isn't necessarily an obvious language, and calling AppleScripts from wxWidgets would require some Dive Into the Mac OS "Carbon" routines yourself.
But, these should point you in the right direction.
Try this :
Code: Select all
wxExecute( wxT("open mailto:[email protected]") );
Not actually true, you can call "osascript" through wxExecutecalling AppleScripts from wxWidgets would require some Dive Into the Mac OS "Carbon" routines yourself.