Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

在读取邮件时 出现了邮件标题错误的问题 #108

@cainiaosgh

Description

@cainiaosgh

这是我在读取标题时出现的错误
Traceback (most recent call last):
File "C:\Users\石广慧\AppData\Local\Programs\Python\Python38\lib\site-packages\zmail\parser.py", line 150, in parse_headers
bname, bvalue = line.split(b':', 1)
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/pachong/基础知识/邮件发送zmail.py", line 33, in
mail1 = server.get_mails(1,mail[0])
File "C:\Users\石广慧\AppData\Local\Programs\Python\Python38\lib\site-packages\zmail\server.py", line 141, in get_mails
headers = self.get_headers(start_index, end_index)
File "C:\Users\石广慧\AppData\Local\Programs\Python\Python38\lib\site-packages\zmail\server.py", line 194, in get_headers
, headers, * = parse_headers(mail_header)
File "C:\Users\石广慧\AppData\Local\Programs\Python\Python38\lib\site-packages\zmail\parser.py", line 152, in parse_headers
raise ParseError('Invalid header:' + str(line))
zmail.exceptions.ParseError: Invalid header:b'dear guanghui'
image
上面的图片是我的邮件标题,请问这是什么原因?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions