Hee
Does anybody know how to check in-application if a mail account is setup on the device?
Thanks
You can call [MFMailComposeViewController canSendMail] to check if there's any mail accounts available for sending mail.
Related
i am creating an application where user will find the deal and if he want to receive the deal detail by sms or email.
how user will get sms and mail from my application without using web service if any sample code is available then please help me.
Thanks in Advance
For mail you can check out this: MFMailComposeViewController and its delegate MFMailComposeViewControllerDelegate.
Documentation here:
https://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html
For sending SMS, MFMessageComposeViewController.
Documentation here:
https://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMessageComposeViewController_class/Reference/Reference.html
Apple provides MFMessageComposeViewController which can be used to send SMS too. This article should solve your problem - How to Send an SMS Progammatically in iOS
I am creating a mail app. I am using MFMailComposeViewController. I am able to check whether the mail client is configured with any of email or not. But can I check that the mail client is configured by a particular email account.
I want to force user to first setup his mail account and then try to send mail. For that I need to check if user is trying to send mail from abc#gmail.com then it should be configured so is it possible to check that if iphone's Mail app is configured by given email.
If possible then how and if not then any alternatives..
Thanks a lot.
The API doesn't expose that information publicly (for probably good reasons, such as preventing developers from harvesting iPhone users' email addresses).
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.
I have a problem in MFMailComposeViewController.
if no one login in mail and i try to open this view, app crashes
how to solve this?
if i login frommail in ipad and after that i try to load this its working fine.
Thanks,
Shyam Parmar
As far as I know the MFMailComposer requires a mail account in-order to send mail so if an account is not set up it will cause problems. you can check if the mfmailcomposer can send mail through its method [MFMailComposeViewController canSendMail];
I am using inbuilt framework of iPhone sdk to send an email.
So is there any way to test this functionality on iPhone simulator.
Also the composer shows only TO, CC, BCC but not FROM, so what email id does it use to send an email to the specified recipients.
Emails sent from apps other than Mail use the default mail account (configured in the Settings app).