Sorry මචන්, මට ඕන database table එකෙ තියන data ටික email body එකට table එකක් විදියට දාගන්න... code එකක් තියනවද?
මම දැනට use කරන code එක මේක... මට තේරෙන්නෙ නෑ කරන්නෙ කොහොමද කියලා...
# Create the plain-text and HTML version of your message
text = """\
Hi,
How are you?
"""
html = """\
<html>
<body>
<p>Hi,<br>
How are you?<br>
has many great tutorials.
</p>
</body>
</html>
"""
# Turn these into plain/html MIMEText objects
part1 = MIMEText(text, "plain")
part2 = MIMEText(html, "html")
# Add HTML/plain-text parts to MIMEMultipart message
# The email client will try to render the last part first
self.message.attach(part1)
self.message.attach(part2)
PM Kara
, මට ඕන database table එකෙ තියන data ටික email body එකට table එකක් විදියට දාගන්න... code එකක් තියනවද?

