{"thread":{"id":"5518","subject":"Problem with send-email","startedAt":"2006-09-08T21:11:25Z","lastAt":"2006-09-08T21:11:25Z","messageCount":1,"participants":["Timur Tabi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26595","messageId":"4501DC7D.5000509@freescale.com","threadId":"5518","inReplyTo":null,"subject":"Problem with send-email","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2006-09-08T21:11:25Z","receivedAt":"2006-09-08T21:11:25Z","isPatch":false,"sender":{"key":"timur@freescale.com","avatar":null},"body":"I'm having two problems with git-send-email.\n\nProblem #1:\n\nI don't know Perl, but I think there's something wrong with this code:\n\nif (!defined $from) {\n\t$from = $author || $committer;\n         print \"$from\\n\";\n\tdo {\n\t\t$_ = $term->readline(\"Who should the emails appear to be from? \",\n\t\t\t$from);\n\t} while (!defined $_);\n\n\t$from = $_;\n\tprint \"Emails will be sent from: \", $from, \"\\n\";\n\t$prompting++;\n}\n\nI don't think the call to readline() is working.  Specifically, the last parameter, $from, is being ignored.  When I call git-send-email without specifying a --from parameter, this code is executed.  But this is what I see:\n\nTimur Tabi <timur@freescale.com>\nWho should the emails appear to be from?\nEmails will be sent from:\n\nThis happens when I press ENTER at the \"Who should the emails appear to be from?\" prompt.  I'm expecting it to assign the default value, which is displayed right above it.  But instead, $from is erased, and so my email doesn't have a From: line.\n\nProblem #2:\n\nI cannot use send-email to send a patch to anyone but myself.  If I do this:\n\ngit-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile\n\nEverything works.  However, if I do this:\n\ngit-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile\n\nI get this:\n\n(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'\n(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'\n5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'\n\nI think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:\n\n\t\tprint $sm \"$header\\n$message\";\n\nMaybe my SMTP server sees the \"From: Timur Tabi <timur@freescale.com>\" that's at the top of $message and gets confused?\n\n-- \nTimur Tabi\nLinux Kernel Developer @ Freescale\n"}]}