[PHP-DB] Re: Mail Again

2002-04-23 Thread Alex Francis

Problem is!!! PHP.INI is at my ISP. Is there a way to make it think it
has been changed.

--
Alex Francis
Cameron Design
35, Drumillan Hill
Greenock PA16 0XD

Tel 01475 798106
[EMAIL PROTECTED]
http://www.camerondesign.co.uk

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender
immediately of any error in transmission.
David Robley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] says...
  Got almost everything to work. Thank you all for your input. Code as
  follows:
  ?include (../config.inc.php); ?
 
  ?php
 
  // setup SQL statement to retrieve link
 
  $SQL =  SELECT * FROM $tablename1 ;
  $SQL = $SQL .  WHERE id = $id ;
 
  // execute SQL statement
  $ret = mysql_db_query($dbname,$SQL,$link);
 
  if (!$ret) { echo(ERROR:  . mysql_error() . \n$SQL\n); }
 
  echo (PB Email Sent/B/P\n);
 
  // retrieve values
  $row = mysql_fetch_array($ret);
  $email = $row[email];
  $title = $row[title];
  $comments = $row[comments];
  $title = $row[title];
 
  mail($email, $title, $comments, $emailaddress);
 
 
  mysql_close($link);
 
  ?
 
  $emailaddress is set in the config.inc.php file and comes in alright as
a
  header in the note.
 
  However, the mail is sent from the following:
  nobody [[EMAIL PROTECTED]]
 
  Is there a way to tell the PHP Server where the mail is coming from.

 There is an item in your php.ini
 sendmail_from string
 Which From: mail address should be used in mail sent from PHP under
 Windows.

 If you look at the docs for mail(), you'll see that there are
 also examples of using the fourth argument to mail() for extra headers,
 including the From: header. I am not sure whether using From: under
 Windows works in lieu of the php.ini entry.

 --
 David Robley
 Temporary Kiwi!

 Quod subigo farinam



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




[PHP-DB] Re: Mail Again

2002-04-23 Thread David Robley

In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Problem is!!! PHP.INI is at my ISP. Is there a way to make it think it
 has been changed.
 
 --
 Alex Francis
 Cameron Design
 35, Drumillan Hill
 Greenock PA16 0XD
 
 Tel 01475 798106
 [EMAIL PROTECTED]
 http://www.camerondesign.co.uk

 David Robley [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] says...
   Got almost everything to work. Thank you all for your input. Code as
   follows:
   ?include (../config.inc.php); ?
  
   ?php
  
   // setup SQL statement to retrieve link
  
   $SQL =  SELECT * FROM $tablename1 ;
   $SQL = $SQL .  WHERE id = $id ;
  
   // execute SQL statement
   $ret = mysql_db_query($dbname,$SQL,$link);
  
   if (!$ret) { echo(ERROR:  . mysql_error() . \n$SQL\n); }
  
   echo (PB Email Sent/B/P\n);
  
   // retrieve values
   $row = mysql_fetch_array($ret);
   $email = $row[email];
   $title = $row[title];
   $comments = $row[comments];
   $title = $row[title];
  
   mail($email, $title, $comments, $emailaddress);
  
  

Try using the fourth parameter, as above. Also, look at the configuration 
section of the manual for the Apache directives, some of which can be 
used in .htaccess files. Finally, ini_set may be an option.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




Re: [PHP-DB] Re: Mail Again

2002-04-23 Thread Alex Francis

Got it at Last Thank you

--
Alex Francis
Cameron Design
35, Drumillan Hill
Greenock PA16 0XD

Tel 01475 798106
[EMAIL PROTECTED]
http://www.camerondesign.co.uk

This message is sent in confidence for the addressee only. It may contain
legally privileged information.
Unauthorised recipients are requested to preserve this confidentiality and
to advise the sender
immediately of any error in transmission.
Lisi [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You can also add the following line to your code:
 $header = From:  Your Name [EMAIL PROTECTED]\n;

 and write your mail statement like this:
 mail($email, $title, $comments, $header);

 You can just stick the variable $emailaddress into whichever variable is
 relevant - what was that for if not the from address?

 -Lisi



 There is an item in your php.ini
 sendmail_from string
 Which From: mail address should be used in mail sent from PHP under
 Windows.
 
 If you look at the docs for mail(), you'll see that there are
 also examples of using the fourth argument to mail() for extra headers,
 including the From: header. I am not sure whether using From: under
 Windows works in lieu of the php.ini entry.
 
 --
 David Robley
 Temporary Kiwi!
 
 Quod subigo farinam
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP-DB] Re: Mail Again

2002-04-22 Thread David Robley

In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Got almost everything to work. Thank you all for your input. Code as
 follows:
 ?include (../config.inc.php); ?
 
 ?php
 
 // setup SQL statement to retrieve link
 
 $SQL =  SELECT * FROM $tablename1 ;
 $SQL = $SQL .  WHERE id = $id ;
 
 // execute SQL statement
 $ret = mysql_db_query($dbname,$SQL,$link);
 
 if (!$ret) { echo(ERROR:  . mysql_error() . \n$SQL\n); }
 
 echo (PB Email Sent/B/P\n);
 
 // retrieve values
 $row = mysql_fetch_array($ret);
 $email = $row[email];
 $title = $row[title];
 $comments = $row[comments];
 $title = $row[title];
 
 mail($email, $title, $comments, $emailaddress);
 
 
 mysql_close($link);
 
 ?
 
 $emailaddress is set in the config.inc.php file and comes in alright as a
 header in the note.
 
 However, the mail is sent from the following:
 nobody [[EMAIL PROTECTED]]
 
 Is there a way to tell the PHP Server where the mail is coming from.

There is an item in your php.ini 
sendmail_from string
Which From: mail address should be used in mail sent from PHP under 
Windows.

If you look at the docs for mail(), you'll see that there are 
also examples of using the fourth argument to mail() for extra headers, 
including the From: header. I am not sure whether using From: under 
Windows works in lieu of the php.ini entry.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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