mirror of https://github.com/scrapy/scrapy.git
Merge pull request #4239 from Apuyuseng/master
Fix mail attachs tcmime *** (#4229)
This commit is contained in:
commit
4be2bbfe75
|
|
@ -73,8 +73,7 @@ class MailSender(object):
|
|||
part = MIMEBase(*mimetype.split('/'))
|
||||
part.set_payload(f.read())
|
||||
Encoders.encode_base64(part)
|
||||
part.add_header('Content-Disposition', 'attachment; filename="%s"' \
|
||||
% attach_name)
|
||||
part.add_header('Content-Disposition', 'attachment', filename=attach_name)
|
||||
msg.attach(part)
|
||||
else:
|
||||
msg.set_payload(body)
|
||||
|
|
|
|||
Loading…
Reference in New Issue