{"thread":{"id":"5521","subject":"Problem with send-email","startedAt":"2006-09-08T21:02:37Z","lastAt":"2006-09-08T22:57:27Z","messageCount":3,"participants":["Timur Tabi","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"26598","messageId":"4501DA6D.9020104@freescale.com","threadId":"5521","inReplyTo":null,"subject":"Problem with send-email","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2006-09-08T21:02:37Z","receivedAt":"2006-09-08T21:02:37Z","isPatch":false,"sender":{"key":"timur@freescale.com","avatar":null},"body":"Does anyone actually use git-send-email?  It's been so broken for me for months that I can't help but think that.\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\n\n-- \nTimur Tabi\nLinux Kernel Developer @ Freescale\n"},{"id":"26604","messageId":"edsqjo$gh3$1@sea.gmane.org","threadId":"5521","inReplyTo":"4501DA6D.9020104@freescale.com","subject":"Re: Problem with send-email","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-08T22:25:30Z","receivedAt":"2006-09-08T22:25:30Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Timur Tabi wrote:\n\n> Everything works.  However, if I do this:\n> \n> git-send-email --from timur@freescale.com --to  \\\n>    --smtp-server remotesmtp.freescale.net patchfile \n> \n\nWhat do you expect when you specify _empty_ To: header?\n\nI use git-send-email from time to time; I always specify From:, \neither entering it when prompted, or using --from parameter.\nThe fact that it didn't fill default value from committer/author\ncore.author+core.email is I guess a bug...\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"26606","messageId":"4501F557.7050103@freescale.com","threadId":"5521","inReplyTo":"edsqjo$gh3$1@sea.gmane.org","subject":"Re: Problem with send-email","fromName":"Timur Tabi","fromEmail":"timur@freescale.com","sentAt":"2006-09-08T22:57:27Z","receivedAt":"2006-09-08T22:57:27Z","isPatch":false,"sender":{"key":"timur@freescale.com","avatar":null},"body":"Jakub Narebski wrote:\n> Timur Tabi wrote:\n> \n>> Everything works.  However, if I do this:\n>>\n>> git-send-email --from timur@freescale.com --to  \\\n>>    --smtp-server remotesmtp.freescale.net patchfile \n>>\n> \n> What do you expect when you specify _empty_ To: header?\n\nSorry, that was a bad cut-and-paste.  I don't know what happened.  That line is supposed to read:\n\ngit-send-email --from timur@freescale.com --to timur@tabi.org --smtp-server remotesmtp.freescale.net patchfile\n\nThe error message I get is the same:\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>\n'\n5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'\n\nI do have some news.  This problem goes away if I don't specify the --smtp-server parameter.\n\n> \n> I use git-send-email from time to time; I always specify From:, \n> either entering it when prompted, or using --from parameter.\n> The fact that it didn't fill default value from committer/author\n> core.author+core.email is I guess a bug...\n\nLike I said, I think the bug is in the call to readline().  Like I said, I don't know Perl, but from the documentation I have read, I don't think readline() takes two parameters.\n\n     do {\n         $_ = $term->readline(\"Who should the emails appear to be from? \",\n             $from);\n     } while (!defined $_);\n\n     $from = $_;\n\n$from does contain the correct value when readline() is called.  The problem is that $_ contains nothing, which causes $from to be erased.\n\n-- \nTimur Tabi\nLinux Kernel Developer @ Freescale\n"}]}