level).
Add option --set-param=header:param=value to set header parameter's value
-(only at the top level).
+(only at the top level). The header must exist.
WHAT'S NEW in version 2.4.0 (2014-03-08)
msg[header] = value
for header, param, value in gopts.set_header_param:
- msg.set_param(param, value, header)
+ if header in msg:
+ msg.set_param(param, value, header)
try:
decode_message(msg)
--- /dev/null
+From test Sat Feb 1 00:00:00 2014
+Return-Path: <bbb@zzz.org>
+Delivered-To: bbb@zzz.org
+Received: by mail.zzz.org (Postfix, from userid 889)
+ id 27CEAD38CC; Fri, 4 May 2001 14:05:44 -0400 (EDT)
+Content-Transfer-Encoding: 7bit
+Message-ID: <15090.61304.110929.45684@aaa.zzz.org>
+From: bbb@ddd.com (John X. Doe)
+To: bbb@zzz.org
+Subject: This is a test message
+Date: Fri, 4 May 2001 14:05:44 -0400
+X-Test: set; test="set"
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+X-MIME-Autoconverted: from us-ascii to utf-8 by test id mimedecode.py
+
+
+Hi,
+
+Do you like this message?
+
+-Me
test_file msg_29.txt msg_29-1.txt -R Content-Type:title
test_file msg_18.txt msg_18-1.txt -R X-Foobar-Spoink-Defrobnit:\*
test_file msg_01.txt msg_01-1.txt --set-header=X-Test:set
+test_file msg_01.txt msg_01-2.txt --set-header=X-Test:set --set-param=X-Test:test:set
+test_file msg_02.txt msg_02.txt --set-param=X-Test:test:set
test_file msg_02.txt msg_02-1.txt --set-param=X-Mailer:test=set
test_file msg_02.txt msg_02-1.txt --set-param=X-Mailer:test:set