Repository: scrapy/scrapy

Issue:
mail attachs tcmime***
```shell
$scrapy shell
2019-12-13 20:21:33 [scrapy.utils.log] INFO: Scrapy 1.8.0 started (bot: Book)
2019-12-13 20:21:33 [scrapy.utils.log] INFO: Versions: lxml 4.4.1.0, libxml2 2.9.4, cssselect 1.1.0, parsel 1.5.2, w3lib 1.21.0, Twisted 19.10.0, Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) - [Clang 6.0 (clang-600.0.57)], pyOpenSSL 19.0.0 (OpenSSL 1.1.1d  10 Sep 2019), cryptography 2.8, Platform macOS-10.15.2-x86_64-i386-64bit
.....
In [1]: from scrapy.mail import MailSender                                                                                       

In [2]:  mailer = MailSender.from_settings(crawler.settings)                                                                     

In [3]:  book = open('为了媳妇去修仙.zip', 'rb')                                                                                 

In [4]: attachments = [('为了媳妇去修仙.zip', 
   ...:                             'application/zip', book)]                                                                    

In [5]: mailer.send(to=['1173372284@qq.com'], 
   ...:                                     attachs=attachments, 
   ...:                                     subject="Convert", 
   ...:                                     body = '', 
   ...:                                     mimetype='application/zip' 
   ...:                                     ) 

In [6]: mailer.e2019-12-13 20:25:33 [parso.python.diff] DEBUG: diff parser start
2019-12-13 20:25:33 [parso.python.diff] DEBUG: line_lengths old: 1; new: 1
2019-12-13 20:25:33 [parso.python.diff] DEBUG: -> code[replace] old[1:1] new[1:1]
2019-12-13 20:25:33 [parso.python.diff] DEBUG: parse_part from 1 to 1 (to 0 in part parser)
2019-12-13 20:25:33 [parso.python.diff] DEBUG: diff parser end
2019-12-13 20:25:35 [scrapy.mail] INFO: Mail sent OK: To=['1173372284@qq.com'] Cc=[] Subject="Convert" Attachs=1                 

```

get mail 
<img width="584" alt="截屏2019-12-13下午8 34 15" src="https://user-images.githubusercontent.com/17330686/70800846-45ddbf80-1de8-11ea-9a6f-d44b13791c20.png">

why attachs `为了媳妇去修仙.zip` change  to `tcmime.954.1140.14065.bin `





Discussion:
I don’t see any code in Scrapy that would cause that. Can you try doing the same process with any other email-deliverying library? It looks to me like one of the mail servers, either the one sending the email or (most likely) the one receiving the email are renaming the attachment for security reasons.
change code scrapy/mail.py line 76

```python
part.add_header('Content-Disposition', 'attachment', filename=attach_name)
```
attachment normal. 

![image](https://user-images.githubusercontent.com/17330686/70810394-a5df6080-1dfe-11ea-9342-8b57e51a9076.png)


before old code not friendly for  Chinese. 


Can you try with the same file and filename?

![image](https://user-images.githubusercontent.com/17330686/70820171-ff518a80-1e12-11ea-907b-c9a790f79901.png)

![image](https://user-images.githubusercontent.com/17330686/70820139-e3e67f80-1e12-11ea-8e20-49edc922b1e2.png)



When the file name consists of alphanumeric characters, it is normal to receive the attachment name.
However，However, problems will occur if the file name is changed to Chinese.
This has nothing to do with the file type

python3.8/email/message.py 527 line 
```python
""""
 Examples:

        msg.add_header('content-disposition', 'attachment', filename='bud.gif')
        msg.add_header('content-disposition', 'attachment',
                       filename=('utf-8', '', Fußballer.ppt'))
        msg.add_header('content-disposition', 'attachment',
                       filename='Fußballer.ppt'))
"""
```

`filename` is can `list` object and set encode. 



Resolving patch:
diff --git a/scrapy/mail.py b/scrapy/mail.py
--- a/scrapy/mail.py
+++ b/scrapy/mail.py
@@ -73,8 +73,7 @@ def send(self, to, subject, body, cc=None, attachs=(), mimetype='text/plain', ch
                 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)


Test patch: