How to call Mail.App to quick write a mail?

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
ChineseAlexander
Earned some good credits
Earned some good credits
Posts: 110
Joined: Fri Mar 31, 2006 6:05 am

How to call Mail.App to quick write a mail?

Post by ChineseAlexander »

Thanks
Ryan Wilcox
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Mon Aug 30, 2004 1:26 pm
Location: PA, USA

Post by Ryan Wilcox »

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.
Ryan Wilcox
Wilcox Development Solutions
http://www.wilcoxd.com
00061205
Knows some wx things
Knows some wx things
Posts: 41
Joined: Mon Jun 16, 2008 3:43 am
Location: Beijing, China

Post by 00061205 »

nice work.
Regards,

00061205
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am

Post by Auria »

Try this :

Code: Select all

wxExecute( wxT("open mailto:[email protected]") );
calling AppleScripts from wxWidgets would require some Dive Into the Mac OS "Carbon" routines yourself.
Not actually true, you can call "osascript" through wxExecute