Is it possible to send the form details through mail using java mail api in android?

2014-12-30T02:27:46

i have written a program which has a form consisting of name , phone no and email and a submit button to send the above details to a mail address , i have also tried using intent and it works fine but i dont want to use intent as i want the user to stay inside the application and not go outside the application. So i got the code for java mail api , and also receiving messages in my mail when i click on submit button , but is it possible to also send the form details with it ?

"Name : " + eName.getText().toString() + '\n' + "Email ID : " + eEmail.getText().toString() + '\n' + "Contact No : " +ePhone.getText().toString() + '\n' + "Message : " + eMessage.getText().toString()

i want to send the above data inside this

    GMailSender sender = new GMailSender(

        "email-address",
        "password");
        // sender.addAttachment(Environment
        // .getExternalStorageDirectory().getPath()
        // + "/image.jpg");

        sender.sendMail("Test mail", "Body message",
                        "[email protected]",// From
                        "[email protected]");// To

        } catch (Exception e) {
            Toast.makeText(getApplicationContext(),
            "Please check the internet connection",
            Toast.LENGTH_LONG).show();
        }
   }

Is it possible ? If yes then need some help please Thanking You

Copyright License:
Author:「arjun narahari」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/27694056/is-it-possible-to-send-the-form-details-through-mail-using-java-mail-api-in-andr

About “Is it possible to send the form details through mail using java mail api in android?” questions

i have written a program which has a form consisting of name , phone no and email and a submit button to send the above details to a mail address , i have also tried using intent and it works fine ...
I have been using Java mail API to send mails generated through the Java program. What I want to do now is to send a mail through Thunderbird mail client so that the mail get saved to the sent items
i am trying to send an email from my android app using java mail api, when i run the code in java project it sends mail successfully but when i use this code into android app, logcat shows error as
I am using the code example in the link (SendEmailCtrl.java) : https://developers.google.com/gmail/api/guides/sending My activity sends email with example, I add the library javax.mail:javax.mail...
In my requirement i need to send a mail directly when user click on the send button without using intents.I have done it with java mail API.But it ask password.Can i send without giving my password...
i have requirement that i need to send/receive email after successful login by user, upon click on email verification i will activate the user . i dont have dedicated smtp server for send/receive m...
I have an android app that sends email through java mail api .The code works fine when my device is connected through mobile data but it doesn't work when device is connected to wifi Here is my Lo...
I am trying to make a simple email app using Java Mail Android API (https://code.google.com/p/javamail-android/) which will send mail with an attachment. But my approach isn't working. It successfu...
How to add mail accounts to mail server through java code using mail api? Is it possible to add mail accounts using Runtime class?
I am using Java mail API to send email through my java application. But I want to send it automatically on future date i.e. any specific date of every month/year. I have used my ISP's SMTP server t...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.