Skip to content

SMTP Sampler incorrectly encodes non-ASCII filenames in email attachments #6652

@medselfkilla

Description

@medselfkilla

Expected behavior

Content-Type: text/plain; charset=UTF-8;
name="=?UTF-8?B?0YLQtdC60YHRgi50eHQ=?="
Content-Disposition: attachment;
filename*=UTF-8''%D1%82%D0%B5%D0%BA%D1%81%D1%82%2E%74%78%74

Actual behavior

Image Image Image

Steps to reproduce the problem

Configure an SMTP Sampler with:
Attach file(s): Path to a file with a non-ASCII name (e.g., D:/temp/текст.txt).

Send the email via SMTP Sampler.
Inspect the Content-type & Content-Disposition headers in the Response data (or raw SMTP traffic).

JMeter Version

5.6.2

Java Version

java version "19" 2022-09-20

OS Version

Microsoft Windows [Version 10.0.19045.4894]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions