0
votes

I am building an android app that would let users send an email to my email address for comments and suggestions. I don't want to start an intent and have the user use their own mail app to send the email. I would just provide textboxes for their email address and their message and when they hit the "Send" button, it should get sent to my email address which is hosted in my own email server.

Is there a way to accomplish this in Java without having to ask the user for their password and opening another app? I tried the tutorial from this site but I am not receiving any emails. I don't see any errors in logcat as well.

2

2 Answers

2
votes

You missed out the last part of the tutorial

If it is required to provide user-name and Password to the e-mail server for authentication purpose then you can set these properties as follows:

 props.setProperty("mail.user", "myuser");
 props.setProperty("mail.password", "mypwd");

So essentially you need user-name, password for sending email from user's account.