How can I send mail from an iPhone application

前端 未结 11 1932
甜味超标
甜味超标 2020-11-22 11:47

I want to send an email from my iPhone application. I have heard that the iOS SDK doesn\'t have an email API. I don\'t want to use the following code because it will exit my

11条回答
  •  南旧
    南旧 (楼主)
    2020-11-22 12:21

    A few things I'd like to add here:

    1. Using the mailto URL won't work in the simulator as mail.app isn't installed on the simulator. It does work on device though.

    2. There is a limit to the length of the mailto URL. If the URL is larger than 4096 characters, mail.app won't launch.

    3. There is a new class in OS 3.0 that lets you send an e-mail without leaving your app. See the class MFMailComposeViewController.

提交回复
热议问题