# Problem with send-email

2 messages from 2006-09-08 to 2006-09-08. Participants: Timur Tabi.
Thread: https://gitlist.dev/t/5520

## Timur Tabi, 2006-09-08 21:13

Subject: Problem with send-email
Message-ID: <4501DCDD.4020403@freescale.com>
URL: https://gitlist.dev/e/4501DCDD.4020403%40freescale.com

```
I'm having two problems with git-send-email.

Problem #1:

I don't know Perl, but I think there's something wrong with this code:

if (!defined $from) {
	$from = $author || $committer;
         print "$from\n";
	do {
		$_ = $term->readline("Who should the emails appear to be from? ",
			$from);
	} while (!defined $_);

	$from = $_;
	print "Emails will be sent from: ", $from, "\n";
	$prompting++;
}

I 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:

Timur Tabi <timur@freescale.com>
Who should the emails appear to be from?
Emails will be sent from:

This 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.

Problem #2:

I cannot use send-email to send a patch to anyone but myself.  If I do this:

git-send-email --from timur@freescale.com --to timur@freescale.com --smtp-server remotesmtp.freescale.net patchfile

Everything works.  However, if I do this:

git-send-email --from timur@freescale.com --to  --smtp-server remotesmtp.freescale.net patchfile

I get this:

(mbox) Adding cc: Timur Tabi <timur@freescale.com> from line 'From: Timur Tabi <timur@freescale.com>'
(sob) Adding cc: Timur Tabi <timur@freescale.com> from line 'Signed-off-by: Timur Tabi <timur@freescale.com>'
5.0.0 <Timur Tabi <timur@freescale.com>... Unbalanced '<'

I think that last line is a response from the SMTP server.  My guess is that there's something wrong with this line:

		print $sm "$header\n$message";

Maybe my SMTP server sees the "From: Timur Tabi <timur@freescale.com>" that's at the top of $message and gets confused?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

```

## Timur Tabi, 2006-09-08 21:35

Subject: Re: Problem with send-email
Message-ID: <4501E22B.6060501@freescale.com>
URL: https://gitlist.dev/e/4501E22B.6060501%40freescale.com
In-Reply-To: <4501DCDD.4020403@freescale.com>

```
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.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

```
