Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6添加图片的优化 #4

Open
piaoliupoiaoliu opened this issue Jul 13, 2022 · 1 comment
Open

#6添加图片的优化 #4

piaoliupoiaoliu opened this issue Jul 13, 2022 · 1 comment

Comments

@piaoliupoiaoliu
Copy link

原方案中添加图片附件时虽发送成功但图片格式会出现被该修改为bin格式的情况,
解决方案:将#6中的msg.attach(message_image)改为
message_image.add_header('Content-Disposition', 'attachment', filename='filename.png') #filename为“图片名字.图片格式”
msg.attach(message_image)
问题即可解决。

@yuanyihan
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants