Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shweta13

macrumors member
Original poster
Aug 7, 2008
38
0
Hi all,

Can we embed Apple script inside iphone appplication? If so how do we do it?
 

shweta13

macrumors member
Original poster
Aug 7, 2008
38
0
Use the mailto: URL

Hi,

Sorry i dont kno javascript...can you please tell me how to use mailto: URL in javascript...i want to directly invoke "mailto" without the help of controls such as buttons etc...
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Last time I did JavaScript, it was
Code:
location.href = "mailto:user@aol.com?subject=test&message=test";

The mailto: URL on the iPhone opens the a new message form, it doesn't send an email. If you need to send an email without user interaction, you'll have to use a server somewhere to do that.
 

Sbrocket

macrumors 65816
Jun 3, 2007
1,250
0
/dev/null
Rather than use JavaScript, you can use -[UIApplication openURL:] to open a new mail in MobileMail.app. Keep in mind that is will terminate your own application.

Code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@""mailto:user@aol.com?subject=test&message=test"]];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.