ming %!s(int64=3) %!d(string=hai) anos
pai
achega
7b8f8c1ee9
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      api/mailer.py

+ 6 - 0
api/mailer.py

@@ -20,7 +20,13 @@ def send(msg_in):
 
     msg = MIMEMultipart()
     msg['Subject'] = 'AI Spokesgirl 服務餘額不足 '
+    
+    msgAlternative = MIMEMultipart('alternative')
+    msg.attach(msgAlternative)
+
     text = MIMEText(msg_in,'html','utf-8')
+
+    msgAlternative.attach(text)
     try:
         server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
         server.ehlo()