views:

431

answers:

3

The url to launch email and start a new email on an iphone is "mailto://[email protected]". I just want to launch the email app, dropping the user at the main menu, or inbox.

"mailto:" starts composing a new blank email

I've tried "mail:", "email:" and a few others. Is there no way to just launch the email app?

+3  A: 

I don't think so, since the whole idea of the url schemes is to launch another app given some context in your own app. Watch a specific YouTube vid, write an email, etc.

in addition, this sounds like a weird requirement - why would you just want to send them to their email client without having them compose an email?

bpapa
His app probably says, "Check your email to complete registration" or something.
Chris Long
Ah, good point. Even if this is the case though, I'd say the right design is to assume that the user is probably well aware of how to check their email on their iPhone. They know when the notification comes or perhaps even any latency that they experience, if they don't have push email on.
bpapa
Bingo. And yes, we decided to just let them figure it out, but I thought it was still worth asking out of curiosity.
DougW
As far as your answer, I don't think your argument is correct. The idea of url schemes is to launch apps... context is not implied.Check out this list of known url schemes for examples of plenty that don't take parameters -- http://applookup.com/
DougW
+2  A: 

Have you tried using an invalid email address? Something like mailto://!!!?

Chris Long
Interesting thought. I'll try it when I get a chance. I'm guessing that even if it works, it will throw the user a notice though.
DougW
+2  A: 

From the documentation (highlight added).

The mailto scheme is used to launch the Mail application and open the email compose sheet. When specifying a mailto URL, you must provide the target email address.

So it does not appear you can do what you want.

-t

Tim
The mailto:// scheme can not do what I want, but that doesn't mean the app hasn't registered another url scheme that can.
DougW
Unless you can find that URL scheme documented in the SDK documentation - using it would be a violation of your developer agreement and your App would be rejected.I don't see any other URL schemes registered for email in the SDK documentation. Sorry.
Tim
Hmmm would it? Using other applications' url schemes isn't a violation of the TOS. I can't seem to find it, but if you can cite me the part of the agreement or apple docs that says that, I'd be happy to accept yours as the answer to my question. Thanks Tim.
DougW
From the Developer Agreement: 3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.
Tim
I appreciate the legwork Tim, and I voted you up, but I'm pretty certain that using a registered url scheme, advertised or not, doesn't fall into the category of a private API. They reject for some pretty crazy reasons, but I just can't envision them rejecting for that one.
DougW