Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. -(void) MailExecute {
  2. if ([MFMailComposeViewController canSendMail])
  3. {
  4. MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];
  5. mailViewController.mailComposeDelegate = self;
  6. [mailViewController setSubject:NSLocalizedString(@"Check this new look", @"")];
  7. [mailViewController setMessageBody: @"my new look" isHTML:YES];
  8.  
  9. [self presentModalViewController:mailViewController animated:YES];
  10.  
  11. [mailViewController release];
  12. }
  13. else
  14. {
  15. UIAlertView *alertInternal = [[UIAlertView alloc]
  16. initWithTitle: NSLocalizedString(@"Notification", @"")
  17. message: NSLocalizedString(@"You have not configured your e-mail client.", @"")
  18. delegate: nil
  19. cancelButtonTitle:NSLocalizedString(@"OK", @"")
  20. otherButtonTitles:nil];
  21. [alertInternal show];
  22. [alertInternal release];
  23. }
  24. }
  25.  
  26. [self presentViewController:mailView animated:YES completion:nil];
  27.  
  28. NSString *path = [self getDatabaseFilePath];
  29. NSData *myData = [NSData dataWithContentsOfFile:path];
  30. [picker addAttachmentData:myData mimeType:@"application/x-sqlite3" fileName:[path lastPathComponent]];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement