Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send an email from my application using email application?

How to send an email from my application using email application?

I am having the one scenario like send email to particular mail id([email protected]). In my application while clicking the link it should call email application and then need to pass above mail id to in "To" box (after login) .

Is there any solution for this issue?

Regards,
Jeyavel N

like image 274
Jeyavel Avatar asked Dec 30 '25 02:12

Jeyavel


1 Answers

You can use the following code to launch the action ACTION_SENDTO in a new activity

Intent intent = new Intent(Intent.ACTION_SENDTO, 
                           Uri.fromParts("mailto", "[email protected]", null));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
like image 71
Jonas Pegerfalk Avatar answered Dec 31 '25 17:12

Jonas Pegerfalk