Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:33:26+00:00 2026-06-17T08:33:26+00:00

Moving on from my original question below: Android Sending an email using a list

  • 0

Moving on from my original question below:

Android Sending an email using a list of email addresses

I have tried to populate the email address line by using a string. When writing the email the message section is populated with the answer given by clicking on a spinner, the code for this is shown as “%1$s”. So if I have a spinner that has 4 different countries in the string for the main email I put:

Country: %1$s

And it will show in the final email to be sent as:

Country: UK

For example.

When I put this string into the email Address instead of it originally looking like:

home%1$s@gmail.com

And coming out in the final email as:

homeUK@gmail.com

It stays as home%1$s@gmail.com!

Is there a reason for this? Is it something that cannot be added to the address line?

I have attached my code below and would very much appreciate someones help. I have been pulling my hair out with this one. The rest of the app is complete!

Main Activity

public void sendFeedbackMessage(String subject, String message) {


        Intent messageIntent = new Intent(android.content.Intent.ACTION_SEND);

        String aEmailList[] = { getResources().getString(R.string.emailaddress_format) };
        String bEmailList[] = { ("country@gmail.com") };

        messageIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
        messageIntent.putExtra(Intent.EXTRA_CC, bEmailList);
          //email.putExtra(Intent.EXTRA_BCC, new String[]{to});

        messageIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);

        messageIntent.setType("plain/text");
        messageIntent.putExtra(android.content.Intent.EXTRA_TEXT, message);

        startActivity(messageIntent);




    }


} 

And the relevant String

<string
        name="emailaddress_format">country%1$s@gmail.com</string>

If any more code is needed to see what I am trying to do then please let me know and I will add it. I didnt want to overload everyone with the whole code and then try and explain where I am struggling.

Hopefully someone can help me and i’m making sense.

Many Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:33:27+00:00Added an answer on June 17, 2026 at 8:33 am

    Not sure on the exact answer to the particular problem you’re having, but an easier way to accomplish what it seems like you’re trying to accomplish would be:

    Spinner yourSpinner = (Spinner)findViewById(R.id.yourSpinner);
    String country = yourSpinner.getSelectedItem().toString();
    
    String aEmailList[] = { "country" + country + "@gmail.com" };
    

    This will get the country the person has selected from the spinner and convert it to a String, which you can then place in the EXTRA_EMAIL as you’re doing already.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are moving from WebForms to MVC and and using a lot of jQuery.
Hi we are using IBM Commerce Sever Moving from one view to another using
Question In a closed system where moving 2-dimensional circular bodies (they have mass and
My Case: I have original Page Control app from Apple. I would like to
trying to get my first android widget and let me tell you moving from
So I have tried a whole bunch of examples from google, but I cannot
Hi all i have written a code to move a file from the original
My original question (below) was perhaps too specific, so I'm going to ask something
Im moving from django to pylons, is there an admin app?
As I am moving from C# to Python, I was wondering if there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.