In the Python script below I'm creating an HTML document with a hyperlink to generate an email. How would I use formatting .format(row[0]) in the body section of the email?
import arcpy, datetime, os
arcpy.env.overwriteOutput = True
points = r"***********"
today = datetime.date.today()
dte = today.strftime('%m/%d/%Y')
dtep = today.strftime('%m%d%Y')
fields = ['Applicant', 'Date_Final', 'Email', 'Permit_No']
arcpy.MakeFeatureLayer_management(points, 'FinalizedApproaches')
f= open("Finalized_{}.html".format(dtep),"w+")
with arcpy.da.SearchCursor(points, fields, "Date_Final = CURRENT_DATE") as cursor:
for row in cursor:
message = """<!DOCTYPE html>
<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color:
}
</style>
</head>
<body>
<h2>Notification Report</h2>
<table>
<tr>
<th>Customer</th>
<th>Status</th>
<th>Date</th>
<th>Email</th>
</tr>
<tr>
<td>Test Name</td>
<td>Finalized</td>
<td>08/30/2018</td>
<td><a href="mailto:test@email.com&subject=Permit Status: Finalized&body={}",%0D%0AThis is to notify you that your approach has been finalized. Please use the link below to view your permit documentation.%0D%0A%0D%0Ahttps://www.arcgis.com">Notify</a></>
</tr>
</table>
</body>
</html>"""
f.write(message)
f.close()
print "{} Finalized report generate".format(dte)