Reputation: 91
I have tried using SMTP sampler with the following details,
But I'm facing the below sampler result,
Response code: 500 Response message: Other MessagingException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.googlemail.com, port: 587; nested exception is: java.net.ConnectException: Connection refused: connect
Can anyone please help me on this?
Upvotes: 1
Views: 1088
Reputation: 168002
You can confirm JMeter network connectivity by adding i.e. HTTP Request sampler and opening a website which definitely exists, i.e. http://example.com
If you get the same "Connection refused" message - most probably you are sitting behind the corporate firewall and you will need to apply some extra configuration so JMeter would use your corporate proxy like:
jmeter -H my.proxy.server -P 8000 -u username -a password
See Using JMeter behind a proxy guide for more information.
If you can send requests to Internet web sites and services successfully - double-check your SMTP Sampler configuration, maybe your config is missing an important setting, i.e. Use StartTLS
Refer Load Testing Your Email Server: How to Send and Receive E-mails with JMeter article for comprehensive explanation and example configurations.
Upvotes: 1