How can I send a form by email with titanium - forms

I have seen the email dialog example and also the email dialog example, but I am not looking for an email client interface.
I also took a look at the pizza ordering app, and I couldn't find any method for the send button.
I have custom text fields and in the end I want to send the whole form to an email recipient. I can't find the way to do that.
That is, I would appreciate your help.

For sending E-mail from your app , you have these options :-
1- Using Titanium.UI.EmailDialog .
The Email Dialog is created with the Titanium.UI.createEmailDialog method. The user needs to register an e-mail account on the device in order to open the dialog. The dialog will not open when there is not a registered e-mail account.
Ex : Android
Read more http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.EmailDialog
But As you said you don`t want like this ! and if you want to send direct messages from your app please see these other options :-
2- Make any backend service like #PHP to send email
for ex:- http://www.w3schools.com/php/func_mail_mail.asp, and using Titanium.Network.HTTPClient to connect with your backend service .
3- Using ArrowDB
Enjoy !

Follow these steps,
1) Create webservice method to send email.
2) Call particular email method in the button click.
Note :
Apple will not approve if you don't provide valid reason to send email via webservice. They might think you are trying to spam users.

Create a web service (e.g. a PHP script) that receives POST data and send an email based on it.
In your app, clicking the button simply collects all the data and POST it to your web service.

You can not check this on emulator/simulator only can check on device. And in device you need to configure any email account like gmail or outlook mail.
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['foo#yahoo.com'];
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>';
var f = Ti.Filesystem.getFile('cricket.wav');
emailDialog.addAttachment(f);
emailDialog.open();

Related

How to get user informations by email

I'm new in swift programming and I'm working on simple app. However, I was wondering if I can build "Contact us" view controller where the user enters his message and his data sent to me by email. Is it possible?
example:
There are two approaches to send mail from iPhone SDK
You could try MFMailComposeViewController to send an email.
You could set up a web server from where you could send the email with the help of web services.
I’ll suggest building a web service, post this data as a JSON object, make a fancy email at server end and shot it to concerned email id, you have an option to do any additional task.
Like storing a data to db, tagging it specific way and filtering emails from blacklisted email ids.
You can use mail gun or mail trap to help you setup simple way.

how can I send emails from facebookmail to my app users?

i would like to send my app users an email from Facebookmail, i have received such email from another app and i would like to do the same for my app users.
the email I have received was from this sender
"apps+kr4m4XXXXX5x#facebookappmail.com"
can someone please advise how it can be done? ( I'm aware that i can send them email directly but im looking to send them directly from facebookmail..?)
* another point to mention is by clicking "unsubscribe" link on the email - this is the link :
http://www.facebook.com/n/?editaccount.php&notifications&block=376XXXXXX2389556&t=1366XXXXX53&l=b&mid=7ddd6d3G5af3eff255b6G0G27&bcode=1.136XXXXX853.AbkyMvZyA7-3FDDD&n_m=my_email#url.com
therefore I'm pretty sure it can be done....
anyone???
** ( the XXXXX i added in order not to recognize the sender )
Thanks
You Can use the REST API which will be deprecated. Unfortunately it's not possible to send emails via Facebook through GRAPH API.
https://developers.facebook.com/docs/reference/rest/notifications.sendEmail/
the link above is broken
it looks like this
https://api.facebook.com/method/notifications.sendEmail?recipients=USER_ID&subject=YOUR_SUBJECT&text=YOUR_EMAIL_BODY&callback=YOUR_CALLBACK_URL&access_token=YOUR_ACCESS_TOKEN_HERE

Automatic email from iphone application

I have seen some similar questions here on stack-overflow, but in my application i want when user click on confirm button automatic email go to the email id specified in the form with other details.
How can i implement this.
You could just make a post request to a server and have the server then send the email.
You cannot send emails automatically without sending the user to the mail application. You could however, take advantage of a third party service like Amazon Simple Email Service http://aws.amazon.com/ses/ to send the message.

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 email with content without using webservice in iPhone app

In my app I need to send the email to the mail id provided by the user with predefined content.
This has to be done internally without the interaction of the user i.e, as soon as user enters email id in the provided textfield and clicks send button, the mail with content has to sent to that mail-id.
Can this be done without using any webservice. Please help me out in this.
Thanks in advance,
Hanu
I have achieved this with SMKSMTPMessage - a library that allows you to send an email with attachments if required from code, without any user interaction required