[PHP-DEV] Help pls!! mail() function header problems

2002-07-11 Thread Thomas \omega\ Henning

Hello all,

I am trying to build a php driven mailing list where i can send an email to
the whole list. Here is my code:

?php
$to  = Henning Tamas [EMAIL PROTECTED] . ,;
$header = From: Test List [EMAIL PROTECTED];

 include(pop3.php);

 $user=irc;
 $password=*;
 $apop=0;
 $pop3_connection=new pop3_class;
 $pop3_connection-hostname=localhost;
 if(($error=$pop3_connection-Open())==)
 {
  echo PREConnected to the POP3 server
$pop3_connection-hostname/PRE\n;
  if(($error=$pop3_connection-Login($user,$password,$apop))==)
  {
   echo PREUser $user logged in./PRE\n;

if(($error=$pop3_connection-RetrieveMessage(1,$headers,$body,2))==)
   {
echo PREMessage 1:\n---Message headers starts below---/PRE\n;

for($line=0;$linecount($headers);$line++) {
 echo PRE,HtmlSpecialChars($headers[$line]),/PRE\n;
 $fullheader=$fullheader.$headers[$line].\r\n;
}

echo PRE---Message headers ends above---\n---Message body starts
below---/PRE\n;
for($line=0;$linecount($body);$line++) {
 echo PRE,HtmlSpecialChars($body[$line]),/PRE\n; $fullbody =
$fullbody . $body[$line]; }
echo PRE---Message body ends above---/PRE\n;
   }
   }
 }
   if($error==
   ($error=$pop3_connection-Close())==)
   echo PREDisconnected from the POP3 server
$pop3_connection-hostname/PRE\n;

echo($error);
$i1=strpos($fullheader,Subject:);
$i2=strlen($fullheader)-$i1;
$subject=substr($fullheader,$i1,$i2);
$subject=substr($subject,9,strlen($subject));
$subject = [MediaSoft]  . $subject;
//mail($to, $subject, $body, $headers) or die(tet);
mail($to, $subject, $fullbody, From: [EMAIL PROTECTED]);
?
I got the pop3.php from www.weberdev.com its a class to download emails from
a POP3 server. My problem is:
When i send an email from a PHP emailer using mail() function to my mailing
list Message Subject is test, Message body is test. I run my script and my
message source looks like this:
Return-Path: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 30667 invoked by alias); 11 Jul 2002 13:04:08 -
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 30662 invoked by uid 99); 11 Jul 2002 13:04:08 -
Date: 11 Jul 2002 13:04:08 -
Message-ID: [EMAIL PROTECTED]
To: Henning Tamas [EMAIL PROTECTED], Root [EMAIL PROTECTED],
Subject: [MediaSoft] test
//---Header ends here  I added this line

From: Test List [EMAIL PROTECTED]

From: [EMAIL PROTECTED]

test

And as you see From: [EMAIL PROTECTED] is in the header section of the
mail() function.
What can I do to fix this problem?

Thomas Henning



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




[PHP-DEV] Re: [PHP-WIN] MSSQL connect

2001-12-26 Thread Thomas \omega\ Henning

?php
$h = server adr; //don't forget 2 change this
$u = user; //don't forget 2 chage this
$p = passw; //don't forget 2 change this
$b = db; //don't forget 2 change this
$connexion = mssql_connect($h, $u, $p);

 Why do you uses quotes here?

mssql_select_db($b);

$sql_temp = select * from test;
//.
$result = mssql_query($sql_temp);
//  ^^

//??

mssql_close($connexion);
?

Here is the problem $sql != $sql_temp
so the $result = NULL; because mssql_query( ) has no query to send to the
MsSQL server.
This should work try it out!!!

Thomas omega Henning




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: [PHP-WIN] MSSQL connect

2001-12-26 Thread Thomas \omega\ Henning

I don't know who's a moron that can;t even see straight
B.A.T. Svensson [EMAIL PROTECTED] wrote in message
27E647E5629ED211BF78009027289C6302157DAB@mail1">news:27E647E5629ED211BF78009027289C6302157DAB@mail1...
 You must be an extremely intelligent person, almost literary quoting my
 answer, and then pinpointing down things I already pointed out! Moron...

 From: Thomas omega Henning
 Sent: Wednesday, December 26, 2001 8:50 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP-WIN] MSSQL connect
 
 
 ?php
 $h = server adr; //don't forget 2 change this
 $u = user; //don't forget 2 chage this
 $p = passw; //don't forget 2 change this
 $b = db; //don't forget 2 change this
 $connexion = mssql_connect($h, $u, $p);
 
  Why do you uses quotes here?
 
 mssql_select_db($b);
 
 $sql_temp = select * from test;
 //.
 $result = mssql_query($sql_temp);
 //  ^^
 
 //??
 
 mssql_close($connexion);
 ?
 
 Here is the problem $sql != $sql_temp
 so the $result = NULL; because mssql_query( ) has no query
 to send to the MsSQL server.
 This should work try it out!!!
 
 Thomas omega Henning



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]