The attached patch has been tested on claws-mail, evolution, balsa,
icedove and works. Mutt just brings up a terminal window and KMail puts
the bcc on the 'to' line. Suspect Mutt is just a config problem for me;
not sure about KMail
(running /usr/lib/x86_64-linux-gnu/xfce4/exo-1/exo-compose-mail-1
kmail /usr/bin/kmail mailto:y...@exampleto.com?bcc=m...@bccexample.com works).

Hope this is helpful.
-- 
Blog: http://goo.gl/iOwv1w

"You can't live a perfect day without doing something for someone 
who will never be able to repay you."
--- exo-compose-mail-1.original	2014-05-24 21:23:22.882877377 +0100
+++ exo-compose-mail-1	2014-05-24 21:51:30.324564167 +0100
@@ -40,6 +40,7 @@
 # mailto:-components
 my @to = ();
 my @cc = ();
+my @bcc = ();
 my $subject = undef;
 my $body = undef;
 my @attachments = ();
@@ -53,6 +54,9 @@
 	elsif ($headers[$n] =~ /^cc$/i ) {
 		push (@cc, $headers[$n + 1]);
 	}
+	elsif ($headers[$n] =~ /^bcc$/i ) {
+		push (@bcc, $headers[$n + 1]);
+	}
 	elsif ($headers[$n] =~ /^subject$/i ) {
 		$subject = $headers[$n + 1];
 	}
@@ -74,6 +78,7 @@
 	# similar to mozilla-remote, but with --compose
 	my $command = "to='" . join(",", @to) . "'";
 	$command .= ",cc='" . join(",", @cc) . "'";
+	$command .= ",bcc='" . join(",", @bcc) . "'";
 	$command .= ",attachment='" . join(",", @attachments) . "'";
 	$subject and $command .= ",subject='$subject'";
 	$body and $command .= ",body='$body'";
@@ -87,6 +92,7 @@
 	my $command = 'xfeDoCommand(composeMessage';
 	$command .= ",to='" . join(",", @to) . "'";
 	$command .= ",cc='" . join(",", @cc) . "'";
+	$command .= ",bcc='" . join(",", @bcc) . "'";
 	$command .= ",attachment='" . join(",", @attachments) . "'";
 	$subject and $command .= ",subject='$subject'";
 	$body and $command .= ",body='$body'";
@@ -110,6 +116,9 @@
 	for my $cc (@cc) {
 		$mailto .= 'cc=' . uri_escape($cc) . '&';
 	}
+	for my $bcc (@bcc) {
+		$mailto .= 'bcc=' . uri_escape($bcc) . '&';
+	}
 	for my $attachment (@attachments) {
 		$mailto .= "attach=$attachment&";
 	}
@@ -127,6 +136,9 @@
 	for my $cc (@cc) {
 		push (@argv, '--cc', $cc);
 	}
+	for my $bcc (@bcc) {
+		push (@argv, '--bcc', $bcc);
+	}
 	for my $attachment (@attachments) {
 		push (@argv, '--attach', $attachment);
 	}
@@ -134,6 +146,7 @@
 	$body and push (@argv, '--body', $body);
 	push (@argv, '--composer');
 	(@to > 0) and push (@argv, $to[0]);
+    print @argv;
 }
 elsif ($style eq 'sylpheed') {
 	# generate the mailto:-URI (somewhat like Evolution)
@@ -144,6 +157,9 @@
 	for my $cc (@cc) {
 		$mailto .= 'cc=' . $cc . '&';
 	}
+	for my $bcc (@bcc) {
+		$mailto .= 'bcc=' . $bcc . '&';
+	}
 	$subject and $mailto .= 'subject=' . uri_escape($subject) . '&';
 	$body and $mailto .= 'body=' . uri_escape($body);
 
@@ -171,6 +187,9 @@
 	for my $cc (@cc) {
 		$mailto .= 'cc=' . uri_escape($cc) . '&';
 	}
+	for my $bcc (@bcc) {
+		$mailto .= 'bcc=' . uri_escape($bcc) . '&';
+	}
 	$subject and $mailto .= 'subject=' . uri_escape($subject) . '&';
 	$body and $mailto .= 'body=' . uri_escape($body);
 
@@ -185,6 +204,9 @@
 	for my $cc (@cc) {
 		push (@argv, '-c', $cc);
 	}
+	for my $bcc (@bcc) {
+		push (@argv, '-b', $bcc);
+	}
 	for my $uri (@attachments) {
 		push (@argv, '-a', $uri->path ());
 	}

Reply via email to