{"thread":{"id":"5520","subject":"Problem with send-email","startedAt":"2006-09-08T21:13:01Z","lastAt":"2006-09-08T21:35:39Z","messageCount":2,"participants":["Timur Tabi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26597","messageId":"4501DCDD.4020403@freescale.com","threadId":"5520","inReplyTo":null,"subject":"Problem with send-email","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2006-09-08T21:13:01Z","receivedAt":"2006-09-08T21:13:01Z","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"},{"id":"26599","messageId":"4501E22B.6060501@freescale.com","threadId":"5520","inReplyTo":"4501DCDD.4020403@freescale.com","subject":"Re: Problem with send-email","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2006-09-08T21:35:39Z","receivedAt":"2006-09-08T21:35:39Z","isPatch":false,"sender":{"key":"timur@freescale.com","avatar":null},"body":"Sorry about the reposts, but my company's email server told me it rejected my posts because it thought they were spam.  I wasn't expecting the server to hold on to them and them send them out later.\n\n-- \nTimur Tabi\nLinux Kernel Developer @ Freescale\n"}]}