Form submission in iOS app? - ios

Im really new to iOS development, but I have some experience in OSX. I am trying to make an app where the users fills out text fields with information and then presses a submit button. The contents of the fields that they filled out are then automatically sent to me via an email.
I built a similar OSX application that could do this, but I cannot figure out how to do it on iOS.
I do not want to use the MessageUI.framework because, as far as I can tell, the user must press the send button after it brings up the email form. I just want it to send in the background.
I have no problem hardcoding in the email address and password, or using the same email for send and receive. ex: to: me#gmail.com from: me#gmail.com
Any pointers would be sweet!

You have two options if you do not want to show the mail composer window to the user
Use an SMTP Client for iOS like this one and send the email from your app with the email id and password hard-coded in the app. But if you want to change the email id or change the password in the future, you'll need to update the app. So this is a less desirable solution
Create a web script on your server which accepts the form fields to be submitted by the user. Then from this web script, send the email to your email id (for instance, if you use a PHP script, use the mail function to send the email). Call this script in the app using NSURLConnection.

You are going to need to make a custom form and then send all of the fields in the form as POST parameters to a custom API that you make on some server. Then you can just redirect that as an email to yourself through something like SMTP

Related

How to securely email something to myself from an iOS app?

I'd like to implement a feature in my app where the user can enter some data, and upon pressing a submit button the app then logs into an email account and sends me an email (so that I can then view the data the user entered). I don't want to just store my password in plain text in the app, so are there any more secure ways to accomplish this?
I understand that usually it's best to just build a custom backend and have the app make a post request, but that won't be possible here.

send email with user input from react native app to an email address

I'm creating a simple pharmacy app that allows users to fill/refill their prescriptions so the pharmacists can prepare them ahead of them arriving. but i can't for the life of me find a way to send the user inputs to an email address without going through the email app. if thats not possible what are some other ways of sending the data ?
thank you!!
There is no way you can send an email directly from the react-native app. You need an email server to send emails. An example is SendPulse or MailGun
You can then send a POST request from your react-native app to their API

Automatically sending an activation key by SMS or email after registration

I'm working on a free iOS app; at the end of the registration (when the user has registered a good phone number and good email address) I want the user to enter a code which he has received on his phone or email.
But the problem is how to send automatically a SMS or an e-mail programmatically that contains the code?
I don't want the user to be redirected to a specific view controller to compose a message by himself (like with MFMessageComposeViewController or MFEmailComposeViewController)
just and only just the same appearance of SMS or email sent to users but with a different activation key (for the keys, I think about auto generated keys stored in a database).
And I think about the same way for forgotten identifiers, the user enter his email address or his phone number in a text field, and a message is automatically sent with the password and the username of the user, if the email address or the phone number entered is already existing in the database, if it is not, it shows an alert view with an error.
Does anyone have an idea for how to do this?
You can use the following services Parse.com + mailgun. Search on Parse.com for a tutorial using mailgun and it should accomplish what you are trying to do. On a side not, be careful when creating an app which does not allow the user to use it until they enter some access code, it is against the Apple rules and could lead to rejection.
I assume you have a server that generates this activation code that is sent to the user.
When the user enters the text field with the code he got it should be sent back to the server with an http request (use NSURLConnection ). The server should response to the http request with approval or error whether the code is right, or send the username and password and any other data the user needs to continue.

Is there any way to send the email without opening the MFMailComposeViewController?

I need to send the email without opening the MFMailCompseViewController. I have searched about this and got some point like use the web service and another one is connect with gmail server through ask the emailID and password from the user.
My email format is fixed i just have to send the email to user whose id will be given by the user without showing any thing else.
Your existing research is accurate - you can connect to some web service to send the e-mail automatically, but you can't automatically create, configure and send using MFMailComposeViewController. The user always gets to see the presented controller and choose whether to do any editing and whether to send or not.
There is no way of sending an email directly from iDevice without showing the MFMailComposeViewController.
If it was possible it would be a great tool for mobile distributed spam bots.
Things to consider: MFMailCompseViewController is an interface for the user to compose an email.
If you want to use it, you have to hand over control to it. Apple does not expose the underlying functionality to you: it has to go through this view controller.
If you don't want the user to be aware that you are sending emails on their behalf (I assume it is on their behalf or you wouldn't need the composer view) you are probable doing things a little wrong; why would you want to send an unsolicited email?
If you want to report information from the device, implement a web service and send it to that. Email is meant for correspondence; don't hijack an account.
If you still need an email, have the web service create it

Reply button in Email MVC 4

I am using MailerBase in MVC 4.0 to send the Email. This is working fine perfectly. My question is: When I send the Email, I want to add a button, so that when user click on this button, will send reply of the email without clicking the default button like Reply in yahoo/GMail mails.
Is it possible in .NET MVC4 ?
This question is not specifically related to ASP.NET MVC. The closest you could get is to include an anchor with the mailto: inside the body of the message:
Reply
If the user clicks on this link it will be opened with the default email client that he has associated on his computer.
This being said, doing such things is a bad idea. People normally know how to reply to emails in their favorite email client. Another reason why this is a bad idea is that most email clients will simply block links in email messages especially if they are not from trusted sources. So even if you include such link it will be useless.

Resources