Opening an email in an iOS app - iphone

When holding down an email address in safari or mail client, a menu pops with the following options: new message, add to contacts, and copy. Is there a way to ad an option to this menu as a third party app that would open that app and insert that email address into it?

Take a look at MFMailComposeViewController in the MessageUI framework.

Related

Creating an iOS app: Using native mail app questions

I'm creating an iPhone app that uses the native iOS mail app. Is it possible that when the user clicks either cancel or send in the mail app, it can then redirect back to the app itself without having to reopen it?
Is it then also possible that when the user goes to access the mail portion of the app, it can display the mail app within my app in a webview type manner? Thanks.
No, you cannot change the functionality of another publisher's app, especially Apple's. But it sounds like you can accomplish what your want to do by using MFMailComposeViewController. It allows you to send an email from within your app, i.e. without leaving it to go to the native mail client.
If what you are doing is just sending emails you can display a MFMailComposeViewController to allow user to send emails without leaving the app.

Load contacts to retrieve email address and send email

I am new to iphone world i want to ask a question:
There is a contact button in my IOS app, all what i want to do is when user tap on that button it opens up my phone contacts , i chose any of the email of my friend from that contacts and then i send email to that address..
I want to achieve this functionality.
I have done its vice versa using messageUI framework. At their when you tap on email a + button appears and when you click on it a contact page open you chose the email address from there. I actually want this functionality on my contact button.
When i tap contacts my phone contacts load i select a contact from there and send email to it. I dont know how to do this in iphone.
Have you looked at some apple documentation like this? Also would help if you posted sample code.

send google maps link via in-app email

actually am developing an iOS application that allows the user to send his position via mail or sms.
I want just to send an email containing a link like http://maps.google.com/maps?q=London
Then the receiver have just to touch that link to open maps application
Is there any way to do that
thank in advance
That's built-in to the Mail app in iOS. If you send yourself http://maps.google.com/maps?q=London in an email, and open it on an iOS device it will automatically link it to the Maps app. If you want to link to the Maps app from a different app see this link How can I launch the Google Maps iPhone application from within my own native application?
You can do something like putting a hyper link inside the message body of the email, and setting the isHTML property to YES when making the message body of your MFMailComposeViewController.
Try looking into the MFMessageComposeViewController and MFMailComposeViewController classes. MFMessageComposeViewController has the body property while MFMailComposeViewController has the setMessageBody:isHTML: method.
After you implement these modal view controller you can easily take http://maps.google.com/maps?q=London set the respective property/use the respective method to fill the message/email body with your maps link along with any other text you want to add.

Create VCards with iPhone Address Book Contacts

I am wondering if there is some way to create and send VCards based upon the iPhone Address Book information from my own app. On the Mac, there is some easy function in the built in app to do this, but I have not seen something on the iPhone like this. So, is there some framework or otherwise that enables me to turn contacts on the iPhone into VCards?
Thanks for any help!
There is a "share contact" button at the bottom of every contact in the contacts app on the phone, press it and you can email a VCard to whoever you want.

Open mail app on firmware 3.1

I would like to make an app to open the native app mail on my iPhone. The problem is that I'm able to do it but the mail app opens on compose a new blank Message, and not on the Main view.
There is no way to open other apps from an iPhone application.
You can only open the Mail app via a mailto URL, and that -as you said- will give you the compose view.