Sendmail From address

emailsendmailsmtp-headers

Any help would be greatly appreciated.

I'm trying to use sendmail to send a message with a custom "from" e-mail address. The body of the message is a file, pasted below.

What I'm seeing is that when I specify a "From:" address, the e-mail doesn't get sent at all. When I specify a "Reply-To" the reply-to address is ignored, and when I send using both a "From" and a "Reply-To", the message doesn't get sent.

The SMTP file used in the e-mail is pasted below. Again, thanks in advance for any advice you can offer.

SUBJECT: Testreplytofrom
From: <accounting@company.com>
Reply-To: <accounting@company.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="FILEBOUNDARY"

--FILEBOUNDARY
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

TEST MESSAGE
--FILEBOUNDARY

Best Answer

1/ Remove "From" and "Reply-To" lines from your template email

2/ cat template.email | sendmail -f "accounting@company.com"