开发者

email scheduling in Android using Service / send email in Background in Android

In my application I have use GmailSender activity. By using that i can send email very well with Activity.

Now I want to send email in Background i.e. at particular time using service. I tried to make object of that GmailSender class and used its sendMail method to send mail in Service. but however it does not execute.

Please give me solution for schedule the email sending using service.

开发者_Go百科

EDIT:

I have tried that GmailSender in other program with Activity and it works well but in the program which i am currently working it don't work with service.

The exception i get is :

javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
04-20 11:53:36.693: VERBOSE/sendMail method(710):   nested exception is:
04-20 11:53:36.693: VERBOSE/sendMail method(710):     java.net.SocketException: Permission denied 

and for above error i have tried this link too but its not working with me.

--Thanks RB


You are probably missing the INTERNET permission in your manifest.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜