2
I’m using a code to send email, call the email sending service and choose a particular email that is already configured on the mobile. Everything is working normally, but I want to put one Alert after sending this email but I can not display at the right time, because I do not have a positive or negative response to the sending of this email. How do I know the email was actually sent? Follow my code...
Intent sendEmail = new Intent(Intent.ACTION_SEND);
sendEmail.putExtra(Intent.EXTRA_EMAIL, new String[]{to});
sendEmail.putExtra(Intent.EXTRA_SUBJECT, assunto);
sendEmail.putExtra(Intent.EXTRA_CC, new String[]{email});
sendEmail.putExtra(Intent.EXTRA_STREAM, imageUri);
sendEmail.putExtra(Intent.EXTRA_TEXT, "texto...");
sendEmail.setType("message/rfc822");
startActivity(Intent.createChooser
(sendEmail, "Enviar o e-mail com: "));
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
alert.setTitle("Obrigado pelo contato !");
alert.setMessage("texto...");
alert.setPositiveButton("OK", null);
alert.show();
This code can help you http://stackoverflow.com/questions/5471217/trivial-get-confirmation-of-email-sent-in-android
– Caique Oliveira