google应用程序引擎python邮件api更改为其他语言的utf-8?
好吧,这是我到目前为止得到的,但它不起作用。如何将utf-8编码为mail api,并使其在一封电子邮件中使用多种语言 提前感谢。google应用程序引擎python邮件api更改为其他语言的utf-8?,python,google-app-engine,Python,Google App Engine,好吧,这是我到目前为止得到的,但它不起作用。如何将utf-8编码为mail api,并使其在一封电子邮件中使用多种语言 提前感谢。.encode('utf-8')将字符串转换成二进制。您必须使用.decode('utf-8') 请参阅:.encode('utf-8')将字符串转换为二进制。您必须使用.decode('utf-8') 请看:我也想出了办法 我发现的一种方法是通过html发送邮件 body = """ Welcome %s, Congratulations, you have jus
.encode('utf-8')
将字符串转换成二进制。您必须使用.decode('utf-8')
请参阅:.encode('utf-8')
将字符串转换为二进制。您必须使用.decode('utf-8')
请看:我也想出了办法 我发现的一种方法是通过html发送邮件
body = """
Welcome %s,
Congratulations, you have just joined us.
Start using our site by click the link below:
%s
We hope that you enjoy!
Team.
恭喜妳/你已成為會員。
%s
希望妳能享受使用!
""".encode('utf-8') % (username, request_url, request_url)
mail.send_mail(sender=sender_address, to=email_address, subject=subject, body=body)
ActivationEmailMessage.html=u”“”
xxxxxx
.encode('ascii','xmlcharrefreplace')
ActivationEmailMessage.send()
我知道怎么做了
我发现的一种方法是通过html发送邮件
body = """
Welcome %s,
Congratulations, you have just joined us.
Start using our site by click the link below:
%s
We hope that you enjoy!
Team.
恭喜妳/你已成為會員。
%s
希望妳能享受使用!
""".encode('utf-8') % (username, request_url, request_url)
mail.send_mail(sender=sender_address, to=email_address, subject=subject, body=body)
ActivationEmailMessage.html=u”“”
xxxxxx
.encode('ascii','xmlcharrefreplace')
ActivationEmailMessage.send()
你认为“行不通”应该告诉我们什么?你认为“行不通”应该告诉我们什么?