Jeyavel
Jeyavel

Reputation: 3030

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

Upvotes: 3

Views: 946

Answers (2)

Jonas Pegerfalk
Jonas Pegerfalk

Reputation: 9206

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);

Upvotes: 4

Peter
Peter

Reputation: 1806

You could use the html syntax and embed a html link into your application.

I'm not 100% sure it will work with android but I don't see any reason why it wouldn't work.

See the example here

Hope this helps Pete

Upvotes: 0

Related Questions