2

我正在发送 html 格式的邮件,格式如下

    nameValuePairs.add(new BasicNameValuePair("message", "<b> Your Last Alert: </b> <br/><br/>  On " + "<font color=\"red\"> " + mDate
                + "</font>" + " at " + "<font color=\"red\"> " + mTime + "</font>" + ", " + "\"<font color=\"red\">" + model + "</font>\""
                + " reported that its battery level was down to " + "<font color=\"red\"> " + batteryLevel + "%.</font>"
                + "<br/> You might want to get it on a charger before it's too late! <br/><br/><br/><br/><b> Do you know where \""
                + "<font color=\"red\">" + model + "</font>\"" + " is? </b><br/><br/> Click " + "<a href=\"" + s + "\"> here </a>"
                + " to view in Google Maps.<br/> To find \"<font color=\"red\">"+ model +"</font>\" with the Last Alert app on another iOS device, click <a href = \"" + linkForiPhone
                + "\"> here </a>. <br/>" + "Android users, Click <a href = \"" + linkForAndroid
                + "\"> here </a>. <br/><br/><br/><b><u> Last Known Location : </u></b><br/> " + address
                + "<br/><br/><br/><br/><br/><b><u>GPS Coordinates</b></u> <br/>" + cutLat + ", " + cutLong
                + "<br/><br/><b><u>Altitude</b></u><br/>" + alt + " " + "<br/><br/><b><u>Location Accuracy</b></u>" + "<br/>" + diameter
                + " Diameter"));

当我在 android 上打开这封邮件时,它看起来很棒,但在 iphone 上,它的格式不正确,如下所示

在此处输入图像描述

在 Android 中,它看起来很好,如下所示

在此处输入图像描述

怎么了?

4

1 回答 1

0

您可以使用直接链接到地图应用程序以获取地址

<a href=http://maps.google.com/maps?q=address>address</a>

并且可能避免邮件应用程序的自动格式化。

于 2012-12-07T10:40:40.093 回答