apache / apache/jmeter

SMTP Sampler incorrectly encodes non-ASCII filenames in email attachments

Open
#6,652 2 comments 0 reactions 0 assignees View on GitHub
defect to-triage
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

### 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]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.