html table in Gmail's body -
i'm etcetera sdk insert snapshot mail , send unity. i'm inserting text email. want formatted in form of table. code have written looks formatted when open in iphone mail app not in gmail app on android. can tell me if i'm going wrong somewhere ?
however, if send mail iphone gmail account, looks fine. when open mail app send content, looks bad.
tags considered not table tag later on.
the code might not of highest standard here is
body = "<html><body>" + divdeviceinfo + "<br>"; body += "unity version = " + application.unityversion + "<br>"; body += "selected server url = " + loginscreenset.selectedserverurl + "<br>"; body += "svn version " + string.format("{0}.{1}", config.bundle_version, config.svn_revision) + "<br>"; body += "client: " + client + "<br>"; body += "player name: " + livedata.player.name + "<br>"; body += "player id: " + livedata.player.player_id + "<br>"; body += "device id: " + devicebridge.getsavedudid() + "<br>"; body += "hardware: " + unityengine.systeminfo.devicemodel + "<br>"; body += "device: " + unityengine.systeminfo.devicename + "<br>"; body += "os: " + unityengine.systeminfo.operatingsystem + "<br>"; body += "os version: " + os_version + "<br>"; body += "client version:" + config.bundle_version + "<br>"; body += "client revision:" + config.svn_revision + "<br>"; body += "static data: " + staticdata.inst.dataversion + "<br>"; body += environment.newline; list<logentry> _recentlogs = logger._recentlogs; string[] _recentlogsinstring = new string[_recentlogs.count]; int = 0; //start table , put headings logs = "<table><tr><th>threadid</th><th>timestamp</th><th>level</th><th>channel</th><th>message</th></tr>"; foreach (logentry _entry in _recentlogs) { logs += "<tr><td>"+ _entry.threadid.tostring() +"</td>"; logs += "<td>" + _entry.timestamp.tostring() + "</td>"; logs += "<td>" + _entry.level.tostring() + "</td>"; logs += "<td>" + _entry.channel.tostring() + "</td>"; logs += "<td>" + _entry.msg.tostring() + "</td></tr>"; } //end table logs += "</table></body></html>"; body += logs;
html email rendering engines typically in stone age. best bet use archaic attributes align , hspace, vspace. not sure engine gmail using, can , see attributes target it.
Comments
Post a Comment