Hi Rob,
I tried adding the css style to my function and it just made it appear as normal text in the email. Am I doing this correctly?
[lua]
local function OnbtnSend( event )
– compose an HTML email with two attachments
local options =
{
to = { “MobileDevelopmentTesting@gmail.com” },
subject = “Incident Report”,
isBodyHtml = true,
body = [[<html>
<head>
<style>
p { margin-bottom: 5px; padding-bottom: 0px; }
</style>
</head>
<body>
<p>Incident Date: ]] … myData.dateDay … " / " … myData.dateMonth … " / " … myData.dateYear … [[</p>
<p>Incident Time: ]] … myData.timeHour … " : " … myData.timeMinute … [[</p>
<p>Did the Incident Cause Harm?: ]] … myData.IRb1 … [[</p>
<p>Who Was Affected By or At Risk By the Incident?: ]] … myData.IRb2 … [[</p>
<p>Where Did the Incident Take Place?: ]] … myData.incidentLocation … [[</p>
<p>Severity of Harm or Damage Caused: ]] … myData.IRb3 … [[</p>
<p>Indicated Part of the Body Affected: ]] … myData.injuryOccurred … [[</p>
<p>What Caused the Incident?: ]] … myData.IRb4 … [[</p>
<p>If Caused By Height, Distance Of Fall?: ]] … myData.fallHeight … [[</p>
<p>If Other, Description of Selection?: ]] … myData.textOther … [[</p>
<p>Brief Description: ]] … myData.breifDes … [[</p>
<p>Medical Intervention: ]] … myData.IRb5 … [[</p>
<p>What Was the Outcome?: ]] … myData.IRb6 … [[</p>
<p>Immediate Action Taken: ]] … myData.actionTaken … [[</p>
<p>Person(s) Affected By the Incident (Name): ]] … myData.nameAffected … [[</p>
<p>Person(s) Affected By the Incident (Email): ]] … myData.affectedEmail … [[</p>
<p>Person(s) Affected By the Incident (Phone): ]] … myData.affectedPhone … [[</p>
<p>Person(s) Affected By the Incident (Student Info): ]] … myData.studentSchool … [[</p>
<p>Person(s) Affected By the Incident (Staff Info): ]] … myData.staffDepartment … [[</p>
<p>Person(s) Affected By the Incident (Staff Line Mgr): ]] … myData.lineManagersName … [[</p>
<p>Witnesses to the Incident:(Name): ]] … myData.witnessName … [[</p>
<p>Witnesses to the Incident:(Email): ]] … myData.witnessEmail … [[</p>
<p>Witnesses to the Incident:(Phone): ]] … myData.witnessPhone … [[</p>
<p>Witnesses to the Incident:(Student Info): ]] … myData.witnessStudentSchool … [[</p>
<p>Witnesses to the Incident:(Staff Info): ]] … myData.witnessStaffDepartment … [[</p>
<p>Person Reporting the Incident:(Name): ]] … myData.reportingName … [[</p>
<p>Person Reporting the Incident:(Email): ]] … myData.reportingEmail … [[</p>
<p>Person Reporting the Incident:(Phone): ]] … myData.reportingPhone … [[</p>
<p>Person Reporting the Incident:(Student Info): ]] … myData.reportingStudentSchool … [[</p>
<p>Person Reporting the Incident:(Staff Info): ]] … myData.reportingStaffDepartment … [[</p>
</body>
</html>]] }
local result = native.showPopup(“mail”, options)
if not result then
print( “Mail Not supported/setup on this device” )
native.showAlert( “Warning!”,
“ERROR: Mail not supported/setup on this device. Contact Support”, { “OK” }
);
end
– NOTE: options table (and all child properties) are optional
end
[/lua]
Thanks again,
Matt.