Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error Extracting Sender if From Header has Multiple Lines #49

@csmith73

Description

@csmith73

I had this problem on a Canon iR-ADV 4735 it allows you to set a Unit Name for the printer and if it has one set it sends the From header as 2 lines. For example:

From: "UNIT NAME" 
    <[email protected]>

It looks like the #findSender method in Mailer.ts only looks for the email in the line that begins with From: It does look like from RFC 5322 that long headers are allowed as long as they start with whitespace. I think just changing the parser so it unfolds the header before parsing by concatenating the extra lines if they begin with a whitespace would fix the issue.

To get around this we just cleared the Unit Name field so it was blank and the parser worked correctly. I also think setting the forceMailbox: in the yaml config would fix this as well if you didn't mind the sending address always being the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions