Hello I am creating an android app and I want to create a contact form that was sent to my mail I would like you to help me I am new to this. thank you very much
Hello I am creating an android app and I want to create a contact form that was sent to my mail I would like you to help me I am new to this. thank you very much
This is a way to make the shipment:
Log.i("Send email", "");
String[] TO = {"[email protected]"};
String[] CC = {"[email protected]"};
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setData(Uri.parse("mailto:"));
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);
emailIntent.putExtra(Intent.EXTRA_CC, CC);
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "encabezado");
emailIntent.putExtra(Intent.EXTRA_TEXT, "[email protected]");
try {
startActivity(Intent.createChooser(emailIntent, "Enviando Email..."));
Log.i("termina envio de email...", "");
}
catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(MainActivity.this, "No existe cliente Email instalado.", Toast.LENGTH_SHORT).show();
}
For your form, you can create a view with several EditText in which you write the necessary values.
Here is an example in Spanish: