Bug 49622

Summary: Allow sending messages without a subject
Product: JMeter - Now in Github Reporter: Luciana Moreira <moreira>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: hauser, moreira
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to allow removing the subject header

Description Luciana Moreira 2010-07-20 10:25:17 UTC
One test to verify if mail systems are able to handle unusual messages is to send messages without a subject.

To allow this I have created a patch that enhances the functionality of the SMTP Sampler in JMeter.

This patch is attached, and consists of a simple check box to determine if the subject should be empty or not.
Comment 1 Sebb 2010-07-20 14:23:40 UTC
There is no attachment.

Also, the SMTP sampler already allows both the Subject and Body to be empty, so I don't think any change is needed.
Comment 2 Ralf Hauser 2010-07-21 01:16:49 UTC
There is a difference between an empty string being in the "Subject" MIME-Header and no "Subject" MIME-Header altogether.

There are real-world mail clients out there that send messages without the subject and also we noticed that there are mail-programs that are not prepared to handle such messages. Therefore, the SMTP sampler would benefit from having this extra feature.
Comment 3 Luciana Moreira 2010-07-21 03:08:51 UTC
Created attachment 25791 [details]
Patch to allow removing the subject header
Comment 4 Luciana Moreira 2010-07-21 03:12:50 UTC
I believe I did not explain it properly. As Ralf said, this is not about setting the string to "" it is about removing the Subject header.

We have seen messages arriving in our mail server in such conditions. This was the reason to enhance the JMeter functionality to allow stress testing the server with this kind of message.
Comment 5 Sebb 2010-07-21 07:03:17 UTC
OK, understood.
Comment 6 Sebb 2010-08-16 16:58:45 UTC
Thanks for the patch.

I changed the message from "Empty Subject" to "Suppress Subject Header" to make it clearer what the checkbox does, and fixed the component_reference patch.

URL: http://svn.apache.org/viewvc?rev=986129&view=rev
Log:
Bug 49622 - Allow sending messages without a subject (SMTP Sampler)

Modified:
   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/usermanual/component_reference.xml
Comment 7 The ASF infrastructure team 2022-09-24 20:37:45 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2387