-1

I am new to jmeter and trying to send an email using SMTP.

Here is my sampler:

enter image description here

this is the error results:

Thread Name: REST example 1-3
Sample Start: 2018-01-15 14:34:54 CET
Load time: 21003
Connect Time: 0
Latency: 0
Size in bytes: 173
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 173
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: 500
Response message: Could not connect to SMTP host: smtp.gmail.com, port: 587

Response headers:


SampleResult fields:
ContentType: 
DataEncoding: null

Please how to fix it?

Thanks

closed as off-topic by c32hedge, Kevin McKenzie, IAmMilinPatel, Bharat Mane, Nitin Rastogi Jan 20 '18 at 3:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers." – c32hedge, Kevin McKenzie, IAmMilinPatel, Bharat Mane, Nitin Rastogi
If this question can be reworded to fit the rules in the help center, please edit the question.

0

First of all try connecting to test connectivity to smtp.gmail.com:587 using telnet tool or equivalent. If you cannot - it might be the case you're behind the corporate firewall and you'll need to "tell" JMeter to use your corporate proxy.

For HTTP add the next lines to system.properties file:

http.proxyHost=your_proxy_host
http.proxyPort=your_proxy_port
https.proxyHost=your_proxy_host
https.proxyPort=your_proxy_port

for SMTP set the following property:

socksProxyHost=your_proxy_host

You can also pass them to JMeter startup script via -D command-line argument like:

jmeter -DsocksProxyHost=your_proxy_host

See Apache JMeter Properties Customization Guide article to learn more about JMeter properties and ways of setting and overriding them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.