Skip to content

Commit c1b221b

Browse files
committed
Added: theoretical support for html emails (#328)
1 parent fab7077 commit c1b221b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libreforms_fastapi/utils/smtp.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def send_mail(
3131
cc_address_list:str|list=[],
3232
logfile=None,
3333
reply_to_addr=None,
34-
# body_type="plain",
34+
body_type="plain",
3535
# parse_to_addr_as_list:bool=False,
3636
):
3737

@@ -92,8 +92,7 @@ def send_mail(
9292

9393
msg['Reply-To'] = reply_to_addr if reply_to_addr else self.from_address
9494

95-
# msg.attach(MIMEText(content, body_type))
96-
msg.attach(MIMEText(content, 'plain', 'utf-8'))
95+
msg.attach(MIMEText(content, body_type, 'utf-8'))
9796

9897
# part = MIMEText(file_content, body_type, 'utf-8')
9998
# part = MIMEText(content, 'plain', 'utf-8')

0 commit comments

Comments
 (0)