Skip to main content
formatação e adição da tag da linguagem
Fonte Link

String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder(); body.append("") .append("") .append("
")

String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder();
body.append("<html><body><div bgcolor='#fcaf17' style='background:#fcaf17;font-family:arial,Verdana,sans-serif'>")
                                .append("<center><table cellpadding='30' cellspacing='0' border='0' bgcolor='#fcaf17' width='100%' style='width:100%;margin:0;padding:0;font-family:arial,Verdana,sans-serif'><tbody><tr>")
                                .append(" <td> <center><br><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='640px' style='width:640px;background:#fff;font-family:arial,Verdana,sans-serif'>")

                                .append(" <tbody><tr> <td><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='620px' style='width:620px;text-align:left;font-family:arial,Verdana,sans-serif'>")
                                .append(" <tbody><tr> <td><img src='link imagem' alt='logo_ncgames' class='CToWUd'>")
                                .append(" </td></tr></tbody></table> <hr style='border-top:#dfdfdf!important;border-right:none;border-left:none'>")
                                .append(" <h3 style='color:#ef871e'>Contato</h3> <p>Nome : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                                .append(" <p>Email : <span style='font-size:18px;font-weight:bold'>bafae596</span></p><p>Telefone : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                                .append(" <p>Descrição : <span style='font-size:18px;font-weight:bold'>bafae596</span></p> </td></tr></tbody></table><table cellpadding='10' cellspacing='0' border='0' bgcolor='#fef3da' width='640px' style='display:block;width:640px;height:40px;font-family:arial,Verdana,sans-serif'>")
                                .append(" <tbody><tr style='color:#1d284b;text-align:center'> <td><span style='color:#ef871e;font-size:10px'>OBS:Este email é enviado pelo sistema. Por favor não responda-o. Caso tenha dúvidas entre em contato.</span>")
                                .append(" </td></tr></tbody></table><br> <br></center></td> </tr></tbody></table></center></div></body></html>");

                        String stremail =  body.toString();

                        Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                        emailIntent.setType("text/html");
                        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, assunto);
                        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to});
                        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stremail));

                        startActivity(Intent.createChooser(emailIntent, "Enviar email...."));

String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder(); body.append("") .append("") .append("
")

                            .append(" <tbody><tr> <td><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='620px' style='width:620px;text-align:left;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr> <td><img src='link imagem' alt='logo_ncgames' class='CToWUd'>")
                            .append(" </td></tr></tbody></table> <hr style='border-top:#dfdfdf!important;border-right:none;border-left:none'>")
                            .append(" <h3 style='color:#ef871e'>Contato</h3> <p>Nome : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Email : <span style='font-size:18px;font-weight:bold'>bafae596</span></p><p>Telefone : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Descrição : <span style='font-size:18px;font-weight:bold'>bafae596</span></p> </td></tr></tbody></table><table cellpadding='10' cellspacing='0' border='0' bgcolor='#fef3da' width='640px' style='display:block;width:640px;height:40px;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr style='color:#1d284b;text-align:center'> <td><span style='color:#ef871e;font-size:10px'>OBS:Este email é enviado pelo sistema. Por favor não responda-o. Caso tenha dúvidas entre em contato.</span>")
                            .append(" </td></tr></tbody></table><br> <br></center></td> </tr></tbody></table></center></div></body></html>");

                    String stremail =  body.toString();

                    Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                    emailIntent.setType("text/html");
                    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, assunto);
                    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to});
                    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stremail));

                    startActivity(Intent.createChooser(emailIntent, "Enviar email...."));
String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder();
body.append("<html><body><div bgcolor='#fcaf17' style='background:#fcaf17;font-family:arial,Verdana,sans-serif'>")
                                .append("<center><table cellpadding='30' cellspacing='0' border='0' bgcolor='#fcaf17' width='100%' style='width:100%;margin:0;padding:0;font-family:arial,Verdana,sans-serif'><tbody><tr>")
                                .append(" <td> <center><br><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='640px' style='width:640px;background:#fff;font-family:arial,Verdana,sans-serif'>")

                                .append(" <tbody><tr> <td><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='620px' style='width:620px;text-align:left;font-family:arial,Verdana,sans-serif'>")
                                .append(" <tbody><tr> <td><img src='link imagem' alt='logo_ncgames' class='CToWUd'>")
                                .append(" </td></tr></tbody></table> <hr style='border-top:#dfdfdf!important;border-right:none;border-left:none'>")
                                .append(" <h3 style='color:#ef871e'>Contato</h3> <p>Nome : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                                .append(" <p>Email : <span style='font-size:18px;font-weight:bold'>bafae596</span></p><p>Telefone : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                                .append(" <p>Descrição : <span style='font-size:18px;font-weight:bold'>bafae596</span></p> </td></tr></tbody></table><table cellpadding='10' cellspacing='0' border='0' bgcolor='#fef3da' width='640px' style='display:block;width:640px;height:40px;font-family:arial,Verdana,sans-serif'>")
                                .append(" <tbody><tr style='color:#1d284b;text-align:center'> <td><span style='color:#ef871e;font-size:10px'>OBS:Este email é enviado pelo sistema. Por favor não responda-o. Caso tenha dúvidas entre em contato.</span>")
                                .append(" </td></tr></tbody></table><br> <br></center></td> </tr></tbody></table></center></div></body></html>");

                        String stremail =  body.toString();

                        Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                        emailIntent.setType("text/html");
                        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, assunto);
                        emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to});
                        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stremail));

                        startActivity(Intent.createChooser(emailIntent, "Enviar email...."));
adicionou 2840 caracteres ao conteúdo
Fonte Link

String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder(); body.append("") .append("") .append("
")

                            .append(" <tbody><tr> <td><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='620px' style='width:620px;text-align:left;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr> <td><img src='link imagem' alt='logo_ncgames' class='CToWUd'>")
                            .append(" </td></tr></tbody></table> <hr style='border-top:#dfdfdf!important;border-right:none;border-left:none'>")
                            .append(" <h3 style='color:#ef871e'>Contato</h3> <p>Nome : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Email : <span style='font-size:18px;font-weight:bold'>bafae596</span></p><p>Telefone : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Descrição : <span style='font-size:18px;font-weight:bold'>bafae596</span></p> </td></tr></tbody></table><table cellpadding='10' cellspacing='0' border='0' bgcolor='#fef3da' width='640px' style='display:block;width:640px;height:40px;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr style='color:#1d284b;text-align:center'> <td><span style='color:#ef871e;font-size:10px'>OBS:Este email é enviado pelo sistema. Por favor não responda-o. Caso tenha dúvidas entre em contato.</span>")
                            .append(" </td></tr></tbody></table><br> <br></center></td> </tr></tbody></table></center></div></body></html>");

                    String stremail =  body.toString();

                    Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                    emailIntent.setType("text/html");
                    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, assunto);
                    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to});
                    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stremail));

                    startActivity(Intent.createChooser(emailIntent, "Enviar email...."));

String[] recipients = new String[]{endEmail, "",};

StringBuilder body = new StringBuilder(); body.append("") .append("") .append("
")

                            .append(" <tbody><tr> <td><table cellpadding='10' cellspacing='0' border='0' bgcolor='#ffffff' width='620px' style='width:620px;text-align:left;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr> <td><img src='link imagem' alt='logo_ncgames' class='CToWUd'>")
                            .append(" </td></tr></tbody></table> <hr style='border-top:#dfdfdf!important;border-right:none;border-left:none'>")
                            .append(" <h3 style='color:#ef871e'>Contato</h3> <p>Nome : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Email : <span style='font-size:18px;font-weight:bold'>bafae596</span></p><p>Telefone : <span style='font-size:18px;font-weight:bold'>bafae596</span></p>")
                            .append(" <p>Descrição : <span style='font-size:18px;font-weight:bold'>bafae596</span></p> </td></tr></tbody></table><table cellpadding='10' cellspacing='0' border='0' bgcolor='#fef3da' width='640px' style='display:block;width:640px;height:40px;font-family:arial,Verdana,sans-serif'>")
                            .append(" <tbody><tr style='color:#1d284b;text-align:center'> <td><span style='color:#ef871e;font-size:10px'>OBS:Este email é enviado pelo sistema. Por favor não responda-o. Caso tenha dúvidas entre em contato.</span>")
                            .append(" </td></tr></tbody></table><br> <br></center></td> </tr></tbody></table></center></div></body></html>");

                    String stremail =  body.toString();

                    Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
                    emailIntent.setType("text/html");
                    emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, assunto);
                    emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{to});
                    emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(stremail));

                    startActivity(Intent.createChooser(emailIntent, "Enviar email...."));
Fonte Link

Enviar e-mail com uma pagina html customizada - android

Boa tarde, Alguém pode me ajudar, estou desenvolvendo um app, onde após receber alguns dados do usuário, é realizado o envio de um e-mail contendo essas informações. Eu gostaria de usar html para que o e-mail fique apresentável, colocar umas cores de fundo no corpo do e-mail, mudar a cor do titulo, essas coisas. Já procurei mas não encontrei, e o que eu achei na net não deu certo. Alguém pode me dar uma força com isso?