开发者

cant able to show the "To field" while sending the Mail from Android app

I have implemented the sen email functionality in my application. For that i am using the below code:

Matcher matcher;
Pattern pattern;
String emailExpression ="^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\\.[a-zA-Z0-9._%-]{2,4}$";
public static String email = "abc@xyz.com";

pattern = Pattern.compile(emailExpression);
        matcher = pattern.matcher(email);
        if(!matcher.matches())
        {
            Toast.makeText(getApplicationContext(),"Some Emails are not valid.",Toast.LENGTH_LONG).show();
        }
        else
        {
            String mailto = (email);
            Intent sendIntent = new Intent(Intent.ACTION_SEND);
            sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
            sendIntent.putExtra(Intent.EXTRA_SUBJECT,"Hello !!");
            sendIntent.pu开发者_开发问答tExtra(Intent.EXTRA_TEXT, "");
            sendIntent.setType("text/plain");
            startActivity(Intent.createChooser(sendIntent, "MySendMail"));
            Toast.makeText(getApplicationContext(),"Check Your Mail box for Delivery Report",Toast.LENGTH_LONG).show();
        }

All Works fine, But while i want to click on the Button of sending mail, i cant able to see that email address in to field which i have set as receipients. What should i have to do ? I want to show the email of receipients to the "To:" field while calling the SendEmail intent. Help me for this. thanks.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜