Created attachment 25707 [details] work in progress for header fields I was not sure if I should create a new RFE or just post on bug45053, sorry if this is not the right place. Mail messages can have several headers which are not currently available in the SMTPSampler. It would be very nice to be able to set this parameter in the sampler. I have already started to work on this, attached you will find my work in progress. Currently I am unsure on how to correctly implement a list of variable size of name/value pairs (header fields). I suppose my solution will be similar to the Arguments class, can somebody confirm? My major concern is: How will the file be loaded and a List (or Map) be created? I know that I have to modify the method SmtpSamplerGUI.configure() but I don't know which method to call on the TestElement. Should I try to cast this element to an SMTPSampler and in there set my List/Map?
I just found out that the SendMailCommand already offers support to setting headers, see SendMailCommand.setHeaders(). Nevertheless, this is not linked to the GUI.
Created attachment 25710 [details] Patch to add headers to Mail Messages on SMTPSampler
Thanks! Applied with some fixes. I also changed the GUI layout as the page was getting too long. URL: http://svn.apache.org/viewvc?rev=960927&view=rev Log: Bug 49552 - Add Message Headers on SMTPSampler Modified: jakarta/jmeter/trunk/docs/images/screenshots/smtp_sampler.png jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/SmtpSampler.java jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/protocol/SendMailCommand.java jakarta/jmeter/trunk/xdocs/changes.xml jakarta/jmeter/trunk/xdocs/images/screenshots/smtp_sampler.png jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2382