How to send an email using the SMTP sampler in JMeter

JMeter is a powerful open-source tool for load testing, performance testing, and functional testing of web applications. It provides extensive features for simulating real-world scenarios and analyzing application performance.

To send an email using the SMTP Sampler in JMeter, you need to follow these steps:

  1. Open JMeter and create a new Test Plan or open an existing one.

  2. Add a Thread Group to your Test Plan. Right-click on the Test Plan and Add -> Threads (Users) -> Thread Group.

  3. Add the SMTP Sampler. Right-click on the Thread Group and click Add -> Sampler -> SMTP Sampler.

  4. Configure the SMTP Sampler with the necessary settings. Right-click the SMTP Sampler and click Add -> Config Element -> SMTP Sampler.

    1. Set the "Server Name or IP" field to the SMTP server's address.

    2. Set the "Port" field to the SMTP server's port number (typically 25 or 587).

    3. Set the "From" field to the sender's email address.

    4. Set the "To" field to the recipient's email address.

    5. Set the "Subject" field to the subject of the email.

    6. Set the "Message" field to the body of the email.

    7. Set any additional fields or properties as required (e.g., authentication, SSL/TLS settings).

  5. Save the Test Plan.

  6. Run the Test Plan. Click the "Play" button or use the menu option and click Run -> Start, to start the test.

  7. JMeter will send the email using the configured SMTP server and display the results in the "Sampler Result" tab.

Create a Test Plan
Create a Test Plan
1 of 4

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved