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 8588579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:50:15+00:00 2026-06-11T22:50:15+00:00

I have function send mail and it looks like this private void email(String emailTo,

  • 0

I have function send mail and it looks like this

private void email(String emailTo, String subject, String emailText, ArrayList<DummyItem> lstItemsUpload) {

        // need to "send multiple" to get more than one attachment
        final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);

        emailIntent.setType("plain/text");

        emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{ emailTo});
        emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
        emailIntent.putExtra(Intent.EXTRA_TEXT, emailText);

        // has to be an ArrayList
        ArrayList<Uri> uris = new ArrayList<Uri>();

        // convert from paths to Android friendly Parcelable Uri's
        for (int i = 0; i < lstItemsUpload.size(); i++) {
            MyItem myItem = lstItemsUpload.get(i);

            File fileIn = new File(myItem.getPath());
            Uri u = Uri.fromFile(fileIn);
            uris.add(u);
        }
        emailIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);

        startActivity(Intent.createChooser(emailIntent, "Send mail..."));
    }

If i choose Email application in chooser, it’s will get default mail address and place it in from text box.

Is there any way to put the from mail address in the code, so the email application will use the input mail address instead of default mail address

  • 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-11T22:50:16+00:00Added an answer on June 11, 2026 at 10:50 pm

    I don’t think you can change the default from mail since the mail client is linked to the user’s mail address.

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

Sidebar

Related Questions

I have used default mail() function to send email it sends emails to yahoo
I have a code like this <script type=text/javascript> function email(){ var myTextField = document.getElementById('email_hidden').value;
I have a script that uses PHP mail() function to send emails: mail(me@mydomain.com, Subject,
i have function to send mail with attachment to microsoft exchange server. My problem
I have a jquery function for sending email with ajax request; function sendMail(from,to,subject,message){ var
I'm using the PHP native mail() function to send HTML emails and have a
I have create a function which to send mail. Its works when I invoke
I have a function for sending email. This function works normally, but it always
So the code: $this->load->library('email'); $this->email->from('mysite@mysite.com', 'mysite'); $this->email->to($email); $this->email->subject('Email Test'); $this->email->message('Testing the email class.'); $this->email->send();
I have a function to send an email with multiple word documents as attachments.

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.