Re: mail function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-10-03 10:40, Jim Pazarena wrote:
when I generate an email using the mail() function, my message body
ALWAYS has the sending/from address
included as the first line of the message body. I am not putting it in
my message body, yet there it is.
Any clues would be appreciated.
server is exim, altho I can't see exim doing it.
Thanks!

ps. only getting into php recently. 'Been in 'c' for years. I really
like php. Flexibility! Power!

attached is short source along with complete email output
Thanks!
--
Jim Pazarena     250.559.7777
www.haidagwaii.net/paz/
<?
$islocal = 1;
if ($islocal)
  {
   $raddr = "23.235.68.254";
   $subject_line = "testing email";
   $to = "php@xxxxxx";
   $from = "webmaster@xxxxxx";
   $envelope_sender = "-f=<$from>";
   $hit_date = date("Y-m-d H:i:s");
   $exec_string = "/u/bin/cust " . $raddr;
   exec ($exec_string, $result, $rval);
   if ($result[0])
     $cust = $result[0];
   else
     $cust = "... unknown";
   $message_body = "$subject_line\n$hit_date\n$raddr - $cust\n";
   mail($to,$subject_line,$message_body,$from,$envelope_sender);
  }
?>

ABOVE IS THE PHP SOURCE
BELOW IS THE ENTIRE EMAIL GENERATED.

Return-path: <webmaster@xxxxxx>
Envelope-to: php@xxxxxx
Delivery-date: Fri, 03 Oct 2014 11:13:52 -0700
Received: from 4-72-235-23.qcislands.net ([23.235.72.4] helo=door.qcislands.net)
     by mail.qcislands.net with esmtp (Exim 4.82)
     (envelope-from <webmaster@xxxxxx>)
     id 1Xa7MW-0003jG-7Q
     for php@xxxxxx; Fri, 03 Oct 2014 11:13:52 -0700
Received: from pgmr by door.qcislands.net with local (Exim 4.82)
     (envelope-from <webmaster@xxxxxx>)
     id 1Xa7MM-00089w-52
     for php@xxxxxx; Fri, 03 Oct 2014 11:13:42 -0700
To: php@xxxxxx
Subject: testing email
X-PHP-Originating-Script: 1003:zz.php
Message-Id: <E1Xa7MM-00089w-52@xxxxxxxxxxxxxxxxxx>
From: webmaster@xxxxxx
Date: Fri, 03 Oct 2014 11:13:42 -0700

webmaster@xxxxxx

testing email
2014-10-03 11:13:42
23.235.68.254 - paz-router

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux