Bug: SMTP $SmtpEvent.Email.Attachments empty/zero bytes while raw $SmtpEvent.Email.Data contains attachments (MimeKit can extract)
Summary
When receiving emails via Pode SMTP, $SmtpEvent.Email.Attachments is empty or contains attachments with Bytes.Length = 0, even though the raw message in $SmtpEvent.Email.Data clearly contains the MIME attachment parts. If I parse $SmtpEvent.Email.Data using MimeKit, the attachments are present and can be extracted with correct sizes.
This makes attachment forwarding/processing unreliable unless I re-parse the raw MIME message myself.
Environment
- Pode: 2.12.1
- PowerShell: 7.4.13
Expected behavior
$SmtpEvent.Email.Attachments contains all attachments present in the email, with non-empty Bytes matching the actual attachment content.
Actual behavior
$SmtpEvent.Email.Attachments is empty
Reproduction steps
- Start a Pode SMTP server with a handler that logs attachment info and saves raw message data.
- Send an email with one or more attachments (e.g., PDF, DOCX, PNG) from Outlook/Exchange.
- Observe that
$SmtpEvent.Email.Attachments is empty or has zero-length bytes.
- Parse
$SmtpEvent.Email.Data with MimeKit and confirm attachments exist and can be extracted.
Bug: SMTP
$SmtpEvent.Email.Attachmentsempty/zero bytes while raw$SmtpEvent.Email.Datacontains attachments (MimeKit can extract)Summary
When receiving emails via Pode SMTP,
$SmtpEvent.Email.Attachmentsis empty or contains attachments withBytes.Length = 0, even though the raw message in$SmtpEvent.Email.Dataclearly contains the MIME attachment parts. If I parse$SmtpEvent.Email.Datausing MimeKit, the attachments are present and can be extracted with correct sizes.This makes attachment forwarding/processing unreliable unless I re-parse the raw MIME message myself.
Environment
Expected behavior
$SmtpEvent.Email.Attachmentscontains all attachments present in the email, with non-emptyBytesmatching the actual attachment content.Actual behavior
$SmtpEvent.Email.Attachmentsis emptyReproduction steps
$SmtpEvent.Email.Attachmentsis empty or has zero-length bytes.$SmtpEvent.Email.Datawith MimeKit and confirm attachments exist and can be extracted.