how to embed html in email body ?

by Makrand » Sat, 27 Feb 2010 13:54:24 GMT


Sponsored Links
 Hello

I am trying to send a email by using Intenet, and i am trying to add
HTML page in email body,

but in compose box its showing only HTML code, its not rendering.

so how to add HTML in Email body.

Here is my Java code

Intent sendIntent = new Intent(Intent.ACTION_SEND);
          sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          sendIntent.setType("text/html");
          sendIntent.putExtra(Intent.EXTRA_EMAIL, mailto);
          sendIntent.putExtra(Intent.EXTRA_SUBJECT,
emailSubject.getText()
                    .toString());
          sendIntent.putExtra(Intent.EXTRA_TEXT, htmlString);
startActivity(Intent.createChooser(sendIntent, "Email"))

the "htmlString" contains my HTML code

Here is my HTML code

html>
<head>
  <meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
  <meta content="width = device-width" name="viewport">
</head>
<body>
<h3>Hello world !!!!!</h3>
</body>
</html>

Please help me !!!!!

--



Other Threads

1. Please, some layout help.

Hello list,

i think i need some help with a layout issue. I have three views, two 
TextViews (header and footer) and in between a ListView. They are 
rendered good, in portait mode. When i go into landscape mode, the 
ViewList is gone. Switching back to portait mode and the ViewList is 
still gone....Here is my xml.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">
        <TextView
                android:id="@+id/header"
            android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="top"
        android:text="HEADER"
     />
        <LinearLayout
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_below="@+id/header"
                android:layout_above="@+id/footer">
                <ListView
                android:id="@+id/ListView01"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:divider="@null"
                android:fadingEdge="none">
                </ListView>
        </LinearLayout>
        <TextView
                android:id="@+id/footer"
                android:layout_alignParentBottom="true"
            android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="FOOTER"
     />
</RelativeLayout>

Any ideas why this is happening?

Thnx

Jiri

--~--~---------~--~----~------------~-------~--~----~

2. Checking whether DB Exists

Hi,

I would like to check whether there is any direct API available to check
whether a particular Database exists or not ?

Currently, to initialize data for the first time (not repeatedly), we try of
open the db and if it fails we know the database does not exists otherwise
it is already created and initialized.

Is there any simple API available to check whether DB exists or not ?

Thank You.
Kumar    _/|\_
www.saisk.com
ku...@saisk.com
"making a profound difference with knowledge and creativity..."

--~--~---------~--~----~------------~-------~--~----~

3. the ISSUE of canvas.drawBitmap API

4. AlertDialog buttons not following the currently installed theme!

5. How come the accelrometers maximum sampling rate are so low?

6. Connection refused

7. edit view stretches too far.