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

Adding an attachment removes the line feed between headers and body. #49

Open
hbog opened this issue May 16, 2024 · 0 comments · May be fixed by #50
Open

Adding an attachment removes the line feed between headers and body. #49

hbog opened this issue May 16, 2024 · 0 comments · May be fixed by #50

Comments

@hbog
Copy link
Contributor

hbog commented May 16, 2024

Attachments create a A: pseudo header, but this removes the (RFC defined) newline between headers and body. This has no impact on sending the mail because the python email package handles the absence of the newline silently (MissingHeaderBodySeparatorDefect). However when adding multiple attachments the A:-pseudo header will be added after the first empty line, which will now be in the body of the message.

For example

  • Before adding the attachment
From:
To:
Subject: 

Dear Addressee

Message ...
  • After adding first attachment, the newline between headers and body is removed
From:
To:
Subject: subject
A: attachment_1
Dear Addressee

Message ...
  • The second attachment pseudo header lands in the body
From:
To:
Subject: subject
A: attachment_1
Dear Addressee
A: attachment_2
Message ...
@hbog hbog linked a pull request May 16, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant