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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:54:41+00:00 2026-06-01T03:54:41+00:00

Sending Email in Android using JavaMail API without using the default/built-in app I’m trying

  • 0

Sending Email in Android using JavaMail API without using the default/built-in app

I’m trying to make an email app for my android according to the above link so I created three classes, made a simple layout but i can’t make it to work? When i start the app in the emulator and the layout comes up and i press send there are no response. I suspect that the problem lies within the “send”. Any tips?

I’ve also added, in the manifest. uses-permission android:name=”android.permission.INTERNET”

And made a simple layout… and everytime i press the send button it doesnt send and only prints out “buttonbutton”!

package gaia.feedback.com;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class GaiaFeedbackActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        final Button send = (Button) this.findViewById(R.id.send);
        send.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub

                try {   
                    GmailSender sender = new GmailSender("username@gmail.com", "password");
                    sender.sendMail("This is Subject",   
                            "This is Body",   
                            "user@gmail.com",   
                            "user@yahoo.com");   
                    System.out.println("buttonbutton");

                } catch (Exception e) {   
                    Log.e("SendMail", e.getMessage(), e);   
                    System.out.println("coolcool");
                } 

            }
        });

    }
}
  • 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-01T03:54:43+00:00Added an answer on June 1, 2026 at 3:54 am

    If you need to send only mail you can use the below lines

    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_VIEW);
    intent.setData(Uri.parse("mailto:"));
    startActivity(Intent.createChooser(intent, "Send via..."));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Sending Email in Android using JavaMail API without using the default android
Following this thread : Sending Email in Android using JavaMail API without using the
Why is it so hard to find an Android example of sending email using
In my Android App I send email messages with images attached. Using the Intent
i`m trying to send an email using native email client on android phone. I
I am writing an android application for sending email which launches the default mail
When sending email using the SMTPClient class in ASP.NET C#, how can I add
How can I test sending email from my application without flooding my inbox? Is
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
using the Code Snippet for sending email in VB.Net I have successfully sent an

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.