Skip to content

Commit

Permalink
send-email: try to order messages in email clients more correctly
Browse files Browse the repository at this point in the history
If --no-chain-reply-to is set, patches may not always be ordered
correctly in email clients.  This patch makes sure each email
sent from a different second.

I chose to start with a time (slightly) in the past because
those are probably more likely in real-world usage and spam
filters might be more tolerant of them.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Mar 26, 2006
1 parent 4bc87a2 commit a5370b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
my $compose_filename = ".msg.$$";

# Variables we fill in automatically, or via prompting:
my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose);
my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time);

# Behavior modification variables
my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0);
Expand Down Expand Up @@ -273,13 +273,14 @@ sub make_message_id


$cc = "";
$time = time - scalar $#files;

sub send_message
{
my @recipients = unique_email_list(@to);
my $to = join (",\n\t", @recipients);
@recipients = unique_email_list(@recipients,@cc);
my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime(time));
my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++));

my $header = "From: $from
To: $to
Expand Down

0 comments on commit a5370b1

Please sign in to comment.