2013-02-12 88 views
0

有什麼辦法從MFMailComposeViewController獲取狀態嗎? 可以說我正在發送一個包含20個圖像的電子郵件,我想顯示一些負載,然後在發送完成後隱藏加載後。MFMailComposeViewController發送狀態

回答

1

否。一旦用戶選擇發送電子郵件並在應用程序中調用委託方法,則電子郵件將位於等待由某個後臺郵件守護程序發送的發件箱中。沒有API來獲取這種電子郵件的狀態。即使郵件因某種原因無法發送,應用程序也無法獲取此信息。

-1
try the delegate methods may be it help you. 


#pragma mark - MailComposeController 

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error 
{ 
    switch (result) 
    { 
     case MFMailComposeResultCancelled: 
      NSLog(@"Mail cancelled: you cancelled the operation and no email message was queued."); 
      break; 
     case MFMailComposeResultSaved: 
      NSLog(@"Mail saved: you saved the email message in the drafts folder."); 
      break; 
     case MFMailComposeResultSent: 
      NSLog(@"Mail send: the email message is queued in the outbox. It is ready to send."); 
      break; 
     case MFMailComposeResultFailed: 
      NSLog(@"Mail failed: the email message was not saved or queued, possibly due to an error."); 
      break; 
     default: 
      NSLog(@"Mail not sent."); 
      break; 
    } 

} 
+1

除非我弄錯了,否則問題是關於在收到'MFMailComposeResultSent'結果後獲取電子郵件的狀態。 – rmaddy 2013-02-12 21:11:41

相關問題