iOS MFMailComposeViewController and getting users Name from contact card
Asked Answered
L

1

0

I want to get the "Me" card's Name so when i create the mail window with MFMailComposeViewController

I can

MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"Suggestion: from (Name of Person)"];

Basically substitute the (Name of Person) with the name on their contact card.

Leasehold answered 3/10, 2012 at 14:51 Comment(7)
Check this answerMarinamarinade
I know how 2 get all contacts. how do I determine if the contact card is "Me" (owner of the device).Leasehold
Maybe a better approach would be getting it from device name, it's not a perfect method but it's the best i found.Marinamarinade
the device name usually has the person's name but it's not always the case. It will look dumb saying "Suggestion from iPhone 5" instead of "Suggestion from John Doe"Leasehold
I know, but it is the closest solution I found, that's why I've posted it just as a comment ;)Marinamarinade
I like your suggestion @ender , do you have working code that can demonstrate this?Leasehold
check this questionMarinamarinade
L
2

You can't get the "Me" card from the iOS SDK. There's a me method for the mac, but not for iOS. If the name of the person will be in the From: field, what value is there in adding it to the subject line?

Luxuriate answered 3/10, 2012 at 19:37 Comment(1)
Some people have weird names (which aren't their real names). Some poeple just have no names and just an email address [email protected]. There is many variations for the from field. I was hoping to make it easy for the receptionist when she gets the emails, she can sort by Subject and see the name quicker.Leasehold

© 2022 - 2024 — McMap. All rights reserved.