Launch Mail app to check for new email - iphone

I know how to launch the Mail app to write a new email (using mailto). But I have a facility for users who have forgotten their password to get it sent to their email, and when they submit the request I would like to launch the Mail app, preferably in their Inbox.
Is there a way to do this?

Not possible. Confirmed by Apple.

If it is possible, it might be outside the public APIs. That said, here's an idea that might work, but I don't have all the details for you. The way you get Mail to open up when you want to send e-mail is that the APIs handle a URL request for mailto: by passing it to Mail. Maybe you can find another URL type that you can request to have opened, Mail will try to open it, but then have nothing there for Mail to open. If all goes in your favor, Mail will open and not show anything to the user (even an error from the bogus request you sent it).
Hell if I know what type of URL you'd need a pass, and there's no guarantee that something like this wouldn't break in a future iPhone OS version.

Related

How to Track an Email properly and Prevent the user from opening the tracking link?

I have a question about tracking email. I've made a server that tracks an email by the inserting the target URL into <img>.
Until now all is good, but if the user (the sender) opens the email, the server gets a GET Request from the Google image proxy. Now this is bad, because this tracking URL was targeting the recipients and not the sender.
I've thought of changing the URL in the sender's side like MailTrack.io does, but don't know how.
Use a mail client that doesn't preview the image. I believe what is happening is that your current mail client is previewing the email for you and tripping your tracking link. Another option would be to use a service like Mailchimp, which will add the tracking code for you. I also believe certain versions of outlook have this feature but I'm not sure how much mileage that will get you.

Is there a way to restrict sending an email to a pre-defined destination only?

I would like to send some info from within the app per email - but restruct the recipient list.
I know when sending emails the standard email-dialog opens. However, is there a solution anyway? Possibly somehow intercepting the "Send" Btn and at least check the recipient list.
No, you cannot do this. iOS requires that the user controls the final setup of an outbound email for security/trust reasons. If you're asking for undocumented workarounds, someone (not me) might know one, but your app won't be App Store-eligible if you find one.
As commenter #Rog says, if you send email via your own server, you can do this however you want without Apple's restrictions.

Securely sending email via external smtp server in cocoa touch

I'd like my app to be able to send an email, from my servers to their address, when they press a button. Seems simple enough but I can't seem to find any straightforward examples. The ones I have found use third party libraries which some people said were insecure in that someone could find a way to send their own emails through that account.
Also, would this type of thing get my app rejected? Do I have to use the built in email message window?
Thanks!
check this out: http://code.google.com/p/skpsmtpmessage/

How to send emai using SMTP server in iphone sdk without using Composer Window?

Here In My app, There is a case where User registering a form
He will give his mail id in one textfield. After Complete the form I need to send a mail to User for conformation of his registering.
Any one can help me please.
Thanks In Advance
I don't think its the right way to send email from the phone to the user's email id. You need to process the form at a remote server and it should send the confirmation email which most of the phone apps with user registration do. If you are going to save the user data locally, there will be several problems and the top problem would be rejection of the app from apple.
actually its pretty simple, you just have to connect to mail server and send commands
http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol

Send mail without MFMailComposeViewController

I want to send mail from an iPhone app without showing an MFMailComposeViewController. I also want this mail to be sent from the user's default Mail account. Is it possible to do this?
This is not supported by the iPhone SDK, probably because Apple doesn't want you to do it.
Why not? My guess: Because it's easy to abuse. If we knew user's email address, we could spam them, we could fake emails from them, etc. Imagine finding out an iPhone app sent an email as you without your knowledge -- not cool, even if the app had good intentions.
So, anything you do to get around that, is likely to get you rejected from the app store.
Having said all that, you could basically write your own smtp interaction code to chat with the user's outgoing mail server. For example, if the user has a gmail account, you could ask them for their email and password, you'd have to know how to talk to the gmail servers, and send email through them.
Going that route means asking the user for their username, password, and either asking for or figuring out their mail server information. Another choice is to send directly from the phone (your own smpt server, not just a client), which is a bit more coding. And if you write your own server, the mail you send is more likely to be blocked since your originating IP might not match the domain on the sender's email.
There also exist some libraries that might help out. Previous related question:
Open Source Cocoa/Cocoa-Touch POP3/SMTP library?
There are legitimate reasons for wanting to send an email. (Such as communicating with a server using SMTP instead of HTTP)
This blog post should get you going: http://vafer.org/blog/20080604120118
It is possible to use MFMailComposeViewController without user interaction. See my answer on the iPhone send email not using MessageUI question.