I am invoking mail application from my mail using messageUI and MFMailComposer. but in iphone os 4.0 if the mail account is not configured,the application crashes while showing the device specific alert to configure the mail account.what can be the solution for this? can this be os issue or device specific issue. Because it works fine on ipod touch with os 3.0
views:
35answers:
1
+1
A:
Hi Javal,
You need to check whether the client is configured for mail before displaying the mail composition interface. Use the class method +(BOOL)canSendMail
from the MFMailComposeViewController
to do this. e.g.
if ([MFMailComposeViewController canSendMail]) {
// show a mail composition view
} else {
// advise user to set up a mail account and try again
}
Simon Whitaker
2010-10-05 07:47:10
Hey Thanks issue solved
Javal Nanda
2010-10-05 08:47:57
Excellent! Glad it helped - good luck with your app! :)
Simon Whitaker
2010-10-05 12:02:00