开发者

How can I send email from my application?

开发者 https://www.devze.com 2022-12-28 04:52 出处:网络
I want to attach a video and send e开发者_C百科mail from my application. I downloaded apples example codeMailComposer. I compiled it. I did not get any errors or warnings.

I want to attach a video and send e开发者_C百科mail from my application.

I downloaded apples example code MailComposer. I compiled it. I did not get any errors or warnings.

I sent the mail to my mail id. But, I could not see any mail in my inbox. I am working on simulator.

I did not set any senders email id in simulator. How can I know whether the code is working or not ?

Thank You.


The simulator cannot send email; nor can all devices, as you'll discover if you use the MFMailComposeViewController +canSendMail method—it returns NO if the device doesn't have a mail account set up. To quote the documentation:

You should call this method before attempting to display the mail composition interface. If it returns NO, you must not display the mail composition interface.

0

精彩评论

暂无评论...
验证码 换一张
取 消