I am having an issue with getting the name of an image that is taken from the photo library or camera. I have successfully picked the image but I want to send the picked image as an email attachment using MFMailComposeViewController. The problem is that the MFMailComposeViewController required a specific name of the image. I have used the following code to get the image name, and it always returning "assest.JPG" and that is not working with MFMailComposeViewController

```
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
[imageView setImage:image];
image_ = image;
image_ = [UIImage imageNamed:@"file.jpg"];
NSURL *imagePath = [editingInfo objectForKey:@"UIImagePickerControllerReferenceURL"];
imageName = [imagePath lastPathComponent];

NSLog(@"%@",imageName);
[self dismissModalViewControllerAnimated:YES];
if (CAMORLIB == 1) {
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}}

```

is there is any other way to deal with this issue?

Thanks,

Mohammed