开发者

Can't send Email from my android Application

开发者 https://www.devze.com 2023-03-26 08:54 出处:网络
Hi I have used the following tutorial to send email from my application : http://coderzheaven.com/2011/05/send-email-from-and-android-application-programatically/

Can't send Email from my android Application

Hi

I have used the following tutorial to send email from my application :

http://coderzheaven.com/2011/05/send-email-from-and-android-application-programatically/

But I am getting the following error when I try to do so:

"No application can perform this action"

I have attached the Snapshot of em开发者_开发技巧ulator below. Pls help.


If you are using an emulator, you’ll need to configure the email client. If the email client is not configured, it will not respond to the Intent we’ll be discussing. If you want to see the chooser in action, you’ll need to configure a device using multiple messaging applications, such as the Gmail application and the Email application.

First you have to configure your email client.

For example add gmail account to emulator as

Settings > Accounts & Sync > Add Account > Google 

after adding account, run your code.


Android does not provide API to send Email directly, you have to call the existing Email client to send Email.


you must configure email client on emulator (or device if you use it) with an account, smtp e pop3 host.

0

精彩评论

暂无评论...
验证码 换一张
取 消