Skip to content

SMTP don't support sending attachments #399

Description

@madmax

What happened?

SMTP currently don't support sending attachments

The SMTP server drops attachments on the floor before forwarding to the useSend API.

When mailparser's simpleParser parses the incoming email stream, it returns a ParsedMail object that does include an attachments array (each with filename, content Buffer, contentType, etc.). However, the code constructs the payload for the API like this:

const emailObject = {
  to: ...,
  from: ...,
  subject: parsed.subject,
  text: parsed.text,
  html: parsed.html,
  replyTo: parsed.replyTo?.text,
};

attachments is never referenced, so anything attached to the SMTP message is silently discarded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions