my code

Para mandar mails

Snippet options

Download: Download snippet as
Copy snippet: For this you need a free my code account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class lay_mail extends Activity 
    public void onCreate(Bundle savedInstanceState) 
   		//levantamos botones
   		final EditText edit_cuerpoMail = (EditText) findVixewById(;
   		Button btn_send=(Button)findViewById(;
   		btn_send.setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) 
				// es necesario un intent que levante la actividad deseada
				Intent itSend = new Intent(android.content.Intent.ACTION_SEND);
				// vamos a enviar texto plano a menos que el checkbox esté marcado
				itSend.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ ""});
				itSend.putExtra(android.content.Intent.EXTRA_SUBJECT, "Little List - Importante - Bug/Sugerencia desde APP!!!");
				itSend.putExtra(android.content.Intent.EXTRA_TEXT, edit_cuerpoMail.getText());


Create a free my code account now.

my code is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.