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
Related
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();
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.
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.
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
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.