Check to see if email is enabled? - iphone

I'm working on an iPhone app that, at a certain point, will try to send an email message. If the user has an email set up, great, if not, I need to change some actions accordingly. My question is how do I check to see if the user's iPhone has an email account setup? I've looked everywhere but I can't seem to find an answer.
I'm using MFMailViewController to send the message, but I don't want to create an instance of it unless I can actually send something. Any ideas?

MFMailComposeViewController class has +canSendMail method which
Returns a Boolean indicating whether
the current device is able to send
email. (YES if the device is configured for sending email or NO if it is not.)

Related

Is it possible to create an app that auto responds to phone calls with a text message, and auto replies to received texts and emails?

I have not been able to find any information about the topic online, so I am assuming it is not possible, but is there a way to create an app that when turned on will respond to all incoming calls by sending them to voicemail and responding with a text message? I know you can set the reply with message in iOS6, but we would want the message to be sent automatically when the call is recieved, currently the respond with message the user still needs to hit a button when the call comes in to send this. We would also want to respond to any incoming SMS/imessages with a text. As well as reply automatically via email to any incoming emails. If anyone could link me to an apple site or somewhere that says you can't do this? Thanks for your help.
Edit - is there any way to get information about notifications for these items? I was thinking if you can't directly handle the call itself, on a timed loop you could check to see if there were any missed calls or any info relating to those? Thanks
Not unless you want to develop and application for jailbroken phones, which will not be allowed in the Apple App Store.

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.

MFMailComposer send email without presenting view

I have created a sample iphone application , that sends an email to a particular user.The user address should be static.I am using MFMailComposer class to send an email from iphone.Its work fine.
Now i want to send email to user without presenting MFMailComposerView.Can we programmatically presses the MFMailComposer send button ?.So it will automatically sends an email.
Is this possible? If means how can i programmatically invoke the send button?
Plz help me?
Thanks in advance.....
Even if you could do this, it would very probably be thrown out of the app store or denied submission. For security reasons the user should ALWAYS be able to see email they are sending.
If you want to send data without the user seeing it, transmit the information to a server.
As others have already said, doing this is a very bad idea. This is technically possible though, see the e-mail section of Stealth Messenger.

email send from ipad without setup account

i want(i mean client :)) to send an email from a particular account.
in my app there is an option of sending a mail.
now i want to do as any one from any ipad sends email from using this app will sent by one particular account.
How can i do so?
Thanks,
Shyam
From this link
By looking at the class reference for MFMailComposeViewController in the documentation, I'd say you can't do anything about it. It's not very flexible unfortunately, same as sending SMS, and there you can't MMS with it, just SMS.
You can't specify a default email address. If you could, I suspect one could view this as a security risk for spam/unsolicited mail.
You can't using Apple's API, it will use the Mail app and whatever account is setup in there. You'll have to grab full sendmail client code and incorporate it into your app.

How to customize the default message composer in iphone sdk?

I need to customize the default message composer as at To: I need to diplay the recipient number and body contains an automatic message.Can it possible to send this message without user interaction as he need not to be tap on to the send button.
Thanks to all,
Monish.
The documentation for MFMessageComposeViewController shows that you can programmatically set the body and the recipients of a text message. It does not, however, expose an API to send the message automatically. The framework requires user interaction.
It would be a terrible thing if an app could send a text message without user intervention. If that were possible, then apps could fire off as many text messages as they wanted, to whomever they wanted, all while charges are getting applied to the user's cell phone bill. That's a lawsuit waiting to happen.
So in a nutshell, you can pre-fill in some stuff, but the user will still have to tap the "Send" button.
No. You may add recipients and put what you like in the body of the message, but the user will always see the message and will be able to modify it. The user has to choose to send it.
If you need to do this automatically, you'll need to implement enough of SMTP to be able to send messages on your own, without the help of the mail framework.