G
YouTube TikTok Games
Skip to content

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

Open

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]

Activity

  1. FSchumacher commented on Apr 21, 2026

    @FSchumacher
    Contributor

    You could try to replace the file lib/mail-1.5.0-b0.jar by the newer 1.6.2 jar from for example https://mvnrepository.com/artifact/com.sun.mail/javax.mail/1.6.2

    I think that should fix this.

  2. medselfkilla commented on Apr 22, 2026

    @medselfkilla
    Author

    @FSchumacher That solved the problem. Thank you.

    Image
  3. added a commit that references this issue on Sep 24, 2026
    d68608f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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