tags:

views:

24

answers:

2

I have added MFMailComposeViewController to my application. In the MFMailComposeViewController there is a button at the top of left side name Cancel.When i click the cancel button it shows an UIActionSheet with three option (save/delete/cancel).

My doubt is when i click the delete draft button it cancel the MFMailComposeViewController.The same process is for save draft button.But i dont know what function it does, when i click the cancel,save,delete (draft) What it will do and how can we check this ?(Whether is correct or not).

And also where can i view the saved draft mails in iphone.Is this possible ?If we can able to delete some option from UIActionSheet.

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error 
{   
     [self dismissModalViewControllerAnimated:YES];
}

I searched lot about this but didnt get an answer.I am running with iphone os 4.0 simulator.

Plz help me ?

Thanks in advance....

A: 

In the simulator, nothing is done with the mail you compose, regardless of which option you choose (even if you choose to send the email). On the device, the mail is either deleted or saved to the user's drafts folder in the Mail application, depending on the choice made.

It is not possible to alter the options available in this action sheet, as it is entirely controlled by the mail compose view controller.

Robot K
Thanks Robot k.Now i have an another doubt.In my application i added google maps application.It works fine.But in the map UI there is button zoomin and zoomout and also current location button, i want to hide or remove this button is this possible? i have load google map application in my UIWebview using this url @"http://maps.google.com/maps?q=3711.Thanks in advance
tamil
Any help ?Would be appreciated
tamil
Ask it as a new question. It doesn't really pertain to the mail compose view controller.
Robot K
ok thanks for your good response
tamil
+1  A: 

You need to implement MFMailComposeViewControllerDelegate here, and implement the below method:

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error  {   
NSString *message = @"";
// Notifies users about errors associated with the interface
switch (result) {
    case MFMailComposeResultCancelled:
        message = @"Mail: canceled";
        break;
    case MFMailComposeResultSaved:
        message = @"Mail: saved";
        break;
    case MFMailComposeResultSent:
        message = @"Mail: sent";
        break;
    case MFMailComposeResultFailed:
        message = @"Mail: failed";
        break;
    default:
        message = @"Mail: not sent";
        break;
}
[self dismissModalViewControllerAnimated:YES];
}
Sagar