I am building an app that has an Activity where client enters his information and presses a button, something like "Place Order". I want my app to send an E-mail with his information to my address after pressing this button. I don't need an Intent, since I don't really know if user set up an Email on his phone or not, so my best bet is to hardcode my Email into code (write my own client) so that e-mail will come from myself with his info. I've searched other threads and found that solutions where people added 3 JAR (mail.jar, additional.jar, activation.jar) and 2 classes GMailSender and JSSEProvider. However, I couldn't get it to work. I have a button with a method OnSend
public void onSend (View view) {
try {
GMailSender sender = new GMailSender("seidalins@gmail.com", "mypassword");
sender.sendMail("This is Subject",
"This is Body",
"seidalins@gmail.com",
"seidalins@gmail.com");
Toast.makeText(this, "button ok", Toast.LENGTH_LONG).show();
}
catch (Exception e) {
Log.e("SendMail", e.getMessage(), e);
}
}
No Exception, I mean I have a Toast saying "button ok" however no email comes.
OR is there any other solutions? Can I, for example, use Parse.com to populate database with his info and then use Parse to send e-mail to me with info? Is it possible?