开发者

Can't send email from application

Can some body help me to understand why my application don't send simple email to predefined adress? There is my code:

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{mailServer});

String subject = (String) reasonVariants.getSelectedItem();
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,
                             userComment.getText().toString());
startActivity(Intent开发者_如何学编程.createChooser(emailIntent, "Send mail..."));

Looks like good, but I don't recive any messages to my mail(mailServer).


Did you look inside your Spam folder? ;-)

Maybe the Email was send successfully but it got lost/deleted/spam-filtered somewhere in the delivery line. Try the sending process in a network, where you can trace the traffic and look there if the mail is really being send.


My idea about wront account settings was right. After some time spended me in MailSender setting's on the phone my project, at last :-), began send mail. So, to finish this discussion I can say onle one - for successful sending e-mail's in Android you must have correctly configurated e-mail client.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜