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...
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.
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.