'JMeter: how to send formatted text via SMPT sampler
Is there a way to send a formatted text with links via JMeter SMTP sampler?
Scenario: I need to send an email, where one of the words e.g. My "Instagram" will have a link to my instagram page.
Option 1: Create such email in Gmail, send it to myself, then download it as .eml file and send use "Send .eml" option in SMTP sampler.
However, my issue is that these links should be changed and lead to different instagram pages with each new email sent, thus I need to pass it as a variable from CSV file. This seems to be impossible to achieve with .eml file as it needs to be modified before each request. Unless there is a way?
Option 2 (preferred): Somehow I need to format text in "Message body" of SMTP sampler. I've tried to copy/paste the same style and tags from "Original" .eml file, but it is always sent as a plain text and Gmail won't format it on client side.
Here is an example of RAW Gmail text with formatted link which I've tried to use in "Message" text box of SMTP Sampler:
Visit my account @dummyaccount<https://l.instagram.com/?u=https%3A%2F%2Ftaplink.> for more info.
Expecting to see the following in the email: Visit my account @dummyaccount - where @dummyaccount is a hyperlink
Actual: Visit my account @dummyaccounthttps://l.instagram.com/?u=https%3A%2F%2Ftaplink. for more info.
Any suggestion will be greatly appreciated.
Solution 1:[1]
Try function at to specify a Boolean expression and locate the element in a vector. The syntax is at(X, [index]). Modify the index to change the condition.
For example:
a=1..1000
b=1000..1
at(a>b)[0]
//return the index 500
a[at(a>b)[99]]
//return the value 600
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Cohen Joy |
