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

Add Header information to PDF #36

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

ajquick
Copy link

@ajquick ajquick commented May 21, 2022

This is a pull request to add the feature requested here: #27

The following ENV variables have been added:

EMAIL_HEADER
EMAIL_HEADER_EXT

These are both False by default.

By turning on the Header, you will now have some basic information added to the PDF such as the subject, date/time, sender and recipient. Example:

image

Right now it displays:

  • Subject
  • Date
  • From
  • Reply-to
  • To

Additional fields such as CC / BCC should probably be added.

By turning on the Header (extended) it will display the full headers as received. However, it currently does not display them very cleanly. Maybe it would be worthwhile to look into how to make them display better. It could be as simple as adding a <pre> tag.

Tested and works.

ajquick added 11 commits May 21, 2022 11:56
Add email information to PDF, as well as the option to rudimentarily show the full headers.
(Python is not a language I typically code in).
Fix str casting.
Python's dicts are arrays, okay.
Try to make full headers look nicer.
Python3 requires escaping the carriage returns.
Make it look better.
Make date appear to the right of the subject.
@ajquick
Copy link
Author

ajquick commented Jun 21, 2022

@rob-luke Any idea on what needs to be reformatted?

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 this pull request may close these issues.

1 participant