Re: [PHP] Mail From option in PHP.ini

2003-07-21 Thread Peter Torraca
On 07/18/2003 12:00 PM, Brian S. Drexler wrote:
 Ok, I want to specify who the mail is coming from by using the sendmail_path
 option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I want
 to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
 whatever else.  Anyone have any ideas how I can do this?  I'm pulling the
 e-mail I'd like to change it to from a MySQL database but can I rewrite the
 php.ini file on the fly or am I stuck.  Any help is greatly appreciated.
Why not just add the From: header to the fourth mail() param? 
Something like this:

$email = [EMAIL PROTECTED];
$admin_email = [EMAIL PROTECTED];
$body = blah blah blah;
$mail = mail($email, Information you requested, $body, From: $admin_email);

I've found that this sets the headers the way most clients expect to 
see them.  We use it a lot to tidy up emails set from reset your 
password functions and the like.  It should be trivial to set the 
From: header based on a db result or whatever.

There is a much expanded version of this solution regarding sending 
emails with attachments through mail() on in the online php manual, 
check out kieran dot huggins at rogers dot com's comments and some 
others on the http://us4.php.net/mail page (it's a 06-Nov-2002 
comment).

I'm coming in a bit late to this conversation -- hopefully I'm not 
too far off base with this reply.  If I am, sorry!

peter

--
Peter Torraca
Webmaster, Math Department
Purdue Univ., Math 813
765-494-9998
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Mail From option in PHP.ini

2003-07-20 Thread Lowell Allen
 From the php website, it appears that the [EMAIL PROTECTED] can be
 put in the fifth parameter of the mail() function:
 
 Example 3. Sending mail with extra headers and setting an additional
 command line parameter.
 
 mail([EMAIL PROTECTED], the subject, $message,
From: [EMAIL PROTECTED], [EMAIL PROTECTED]);
 
 
 Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3
 this parameter is disabled in safe_mode and the mail() function will
 expose a warning message and return FALSE if you're trying to use it.

I followed this recent thread with some interest, because I'd like to be
able to set the return-path header for a script that emails to a large list,
which would in turn allow me to identify bounced emails. I'm using a shared
host server, with PHP running as the master account user name, so the
return-path for emails is something like Return-Path:
[EMAIL PROTECTED]. I had accepted that I could not change
the return-path value with PHP, but reading about this fifth parameter
renewed my hope that I could.

I tried adding a fifth parameter to mail() in order to do this, like so:

// fifth mail() parameter to set envelope sender
$cmd_line_param = [EMAIL PROTECTED];
mail($fullname$email, $subject, $message, $headers, $cmd_line_param);

This didn't change the return-path header. Perhaps the problem is that I
have no idea what the syntax of the command line parameter is (what the -f
does).

Can anyone advise? Is it possible to use this fifth parameter to set the
return-path header, and if so, what's the syntax?

TIA,

--
Lowell Allen


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



Re: [PHP] Mail From option in PHP.ini

2003-07-20 Thread Curt Zirzow
* Thus wrote Lowell Allen ([EMAIL PROTECTED]):
 return-path for emails is something like Return-Path:
 [EMAIL PROTECTED]. I had accepted that I could not change
 the return-path value with PHP, but reading about this fifth parameter
 renewed my hope that I could.
 
 I tried adding a fifth parameter to mail() in order to do this, like so:
 
 // fifth mail() parameter to set envelope sender
 $cmd_line_param = [EMAIL PROTECTED];
 mail($fullname$email, $subject, $message, $headers, $cmd_line_param);
 
 This didn't change the return-path header. Perhaps the problem is that I
 have no idea what the syntax of the command line parameter is (what the -f
 does).

I believe its '-f [EMAIL PROTECTED]', could be different depending on wich
sendmail your using.

I'm curious though what if your sendmail already has a -f on it:
  php.ini: sendmail_path=sendmail [EMAIL PROTECTED]

thus a command
sendmail [EMAIL PROTECTED] [EMAIL PROTECTED]

 
 Can anyone advise? Is it possible to use this fifth parameter to set the
 return-path header, and if so, what's the syntax?
 

Also, the 5th paramater is disabled in safe_mode, check that also if the
above doesn't work.


Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



[PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
Ok, I want to specify who the mail is coming from by using the sendmail_path
option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I want
to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
whatever else.  Anyone have any ideas how I can do this?  I'm pulling the
e-mail I'd like to change it to from a MySQL database but can I rewrite the
php.ini file on the fly or am I stuck.  Any help is greatly appreciated.
Thanks!

Brian


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



Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread CPT John W. Holmes
 Ok, I want to specify who the mail is coming from by using the
sendmail_path
 option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I want
 to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
 whatever else.  Anyone have any ideas how I can do this?  I'm pulling the
 e-mail I'd like to change it to from a MySQL database but can I rewrite
the
 php.ini file on the fly or am I stuck.  Any help is greatly appreciated.

Why not just put it in the extra headers?

$headers .= From: $email_address_from_your_database\r\n;

Or you could possibly use ini_set() to change the php.ini setting.

---John Holmes...


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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
I tried the extra header.  The problem is with the return receipts.  The
mail is being generated by a server other than my main e-mail server, so if
I want a delivery/read receipt I have to specify a From e-mail address or
else it will default to the user executing the script, i.e.
[EMAIL PROTECTED]  ini_set() does not appear to work with sendmail_path.
sendmail_path is in the PHP_INI_SYSTEM group so it can only be set in the
php.ini or httpd.conf...Thanks for the suggestion though...

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:09 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Mail From option in PHP.ini


 Ok, I want to specify who the mail is coming from by using the
sendmail_path
 option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I want
 to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
 whatever else.  Anyone have any ideas how I can do this?  I'm pulling the
 e-mail I'd like to change it to from a MySQL database but can I rewrite
the
 php.ini file on the fly or am I stuck.  Any help is greatly appreciated.

Why not just put it in the extra headers?

$headers .= From: $email_address_from_your_database\r\n;

Or you could possibly use ini_set() to change the php.ini setting.

---John Holmes...


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



Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread skate
the sendmail_path in php.ini is to do with where abouts the sendmail program
is located, not where your sending mail from...

if you define the extra headers in the mail, such as FROM and REPLY-TO, you
shouldn't have any problems. basically, it's just like fake-mail, and your
recipient should be none-the-wiser unless he really wants to sift through
the headers.


- Original Message -
From: Brian S. Drexler [EMAIL PROTECTED]
To: 'CPT John W. Holmes' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 4:10 PM
Subject: RE: [PHP] Mail From option in PHP.ini


 I tried the extra header.  The problem is with the return receipts.  The
 mail is being generated by a server other than my main e-mail server, so
if
 I want a delivery/read receipt I have to specify a From e-mail address
or
 else it will default to the user executing the script, i.e.
 [EMAIL PROTECTED]  ini_set() does not appear to work with sendmail_path.
 sendmail_path is in the PHP_INI_SYSTEM group so it can only be set in the
 php.ini or httpd.conf...Thanks for the suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


  Ok, I want to specify who the mail is coming from by using the
 sendmail_path
  option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I
want
  to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
  whatever else.  Anyone have any ideas how I can do this?  I'm pulling
the
  e-mail I'd like to change it to from a MySQL database but can I rewrite
 the
  php.ini file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...


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






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



Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread sven
... and how about this?
$headers .= Return-Path: $email_address_from_your_database\r\n;
tell me, if it works.

ciao SVEN


Brian S. Drexler wrote:
 I tried the extra header.  The problem is with the return receipts.
 The mail is being generated by a server other than my main e-mail
 server, so if I want a delivery/read receipt I have to specify a
 From e-mail address or else it will default to the user executing
 the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
 work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group
 so it can only be set in the php.ini or httpd.conf...Thanks for the
 suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


 Ok, I want to specify who the mail is coming from by using the
 sendmail_path option in the PHP.ini.  I've added the
 [EMAIL PROTECTED] to it, but I want to be able to dynmaically change
 [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone have
 any ideas how I can do this?  I'm pulling the e-mail I'd like to
 change it to from a MySQL database but can I rewrite the php.ini
 file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...



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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
It's not the recipient that is the problem.  The extra headers work fine for
that.  It's the delivery and read notifications (recipient's mail server).
The From header that is generated by sendmail itself is where I'm getting
the problem.  If I specify the -f option in the sendmail_path it fixes the
problem.  Just specifying a From header works for the recipients e-mail
client, but it doesn't work for their server...I also tried
Content-Disposition-To, Return-Path and a few others.  All
unsuccessfully

-Original Message-
From: skate [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:16 AM
To: [EMAIL PROTECTED]; 'CPT John W. Holmes';
[EMAIL PROTECTED]
Subject: Re: [PHP] Mail From option in PHP.ini


the sendmail_path in php.ini is to do with where abouts the sendmail program
is located, not where your sending mail from...

if you define the extra headers in the mail, such as FROM and REPLY-TO, you
shouldn't have any problems. basically, it's just like fake-mail, and your
recipient should be none-the-wiser unless he really wants to sift through
the headers.


- Original Message -
From: Brian S. Drexler [EMAIL PROTECTED]
To: 'CPT John W. Holmes' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 4:10 PM
Subject: RE: [PHP] Mail From option in PHP.ini


 I tried the extra header.  The problem is with the return receipts.  The
 mail is being generated by a server other than my main e-mail server, so
if
 I want a delivery/read receipt I have to specify a From e-mail address
or
 else it will default to the user executing the script, i.e.
 [EMAIL PROTECTED]  ini_set() does not appear to work with sendmail_path.
 sendmail_path is in the PHP_INI_SYSTEM group so it can only be set in the
 php.ini or httpd.conf...Thanks for the suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


  Ok, I want to specify who the mail is coming from by using the
 sendmail_path
  option in the PHP.ini.  I've added the [EMAIL PROTECTED] to it, but I
want
  to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or
  whatever else.  Anyone have any ideas how I can do this?  I'm pulling
the
  e-mail I'd like to change it to from a MySQL database but can I rewrite
 the
  php.ini file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...


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






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


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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
No, I tried this too.  Here is what I've tried

$hdrs = array(
'From'= ''.$FullName.' '.$Email.'',
'Return-Path'   =  $Email,
//'From'=  $Email,
//'Disposition-Notification-To' = ''.$FullName.' 
'.$Email.'',
'Disposition-Notification-To' = $Email,
'Return-Receipt-To' = '' .$FullName.' '.$Email.'',
//'Return-Path' = $Email,
'Subject' = 'Your Quote # '.$Theresult
);
The commented out ones were also tried


-Original Message-
From: sven [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail From option in PHP.ini


... and how about this?
$headers .= Return-Path: $email_address_from_your_database\r\n;
tell me, if it works.

ciao SVEN


Brian S. Drexler wrote:
 I tried the extra header.  The problem is with the return receipts.
 The mail is being generated by a server other than my main e-mail
 server, so if I want a delivery/read receipt I have to specify a
 From e-mail address or else it will default to the user executing
 the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
 work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group
 so it can only be set in the php.ini or httpd.conf...Thanks for the
 suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


 Ok, I want to specify who the mail is coming from by using the
 sendmail_path option in the PHP.ini.  I've added the
 [EMAIL PROTECTED] to it, but I want to be able to dynmaically change
 [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone have
 any ideas how I can do this?  I'm pulling the e-mail I'd like to
 change it to from a MySQL database but can I rewrite the php.ini
 file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...



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

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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread M.A.Bond
I take it you've also tried setting Reply-To: ??
Same format as From:

Mark

-Original Message-
From: Brian S. Drexler [mailto:[EMAIL PROTECTED] 
Sent: 18 July 2003 16:25
To: 'sven'; php-general
Subject: RE: [PHP] Mail From option in PHP.ini


No, I tried this too.  Here is what I've tried

$hdrs = array(
'From'= ''.$FullName.' '.$Email.'',
'Return-Path'   =  $Email,
//'From'=  $Email,
//'Disposition-Notification-To' = ''.$FullName.'
'.$Email.'',
'Disposition-Notification-To' = $Email,
'Return-Receipt-To' = '' .$FullName.'
'.$Email.'',
//'Return-Path' = $Email,
'Subject' = 'Your Quote # '.$Theresult
);
The commented out ones were also tried


-Original Message-
From: sven [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail From option in PHP.ini


... and how about this?
$headers .= Return-Path: $email_address_from_your_database\r\n;
tell me, if it works.

ciao SVEN


Brian S. Drexler wrote:
 I tried the extra header.  The problem is with the return receipts.
 The mail is being generated by a server other than my main e-mail
 server, so if I want a delivery/read receipt I have to specify a
 From e-mail address or else it will default to the user executing
 the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
 work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group
 so it can only be set in the php.ini or httpd.conf...Thanks for the
 suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


 Ok, I want to specify who the mail is coming from by using the
 sendmail_path option in the PHP.ini.  I've added the
 [EMAIL PROTECTED] to it, but I want to be able to dynmaically change
 [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone have
 any ideas how I can do this?  I'm pulling the e-mail I'd like to
 change it to from a MySQL database but can I rewrite the php.ini
 file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...



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

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


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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
Yes, sorry...forgot to include that one...:-)

-Original Message-
From: M.A.Bond [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:31 AM
To: 'sysadmin'; 'sven'; php-general
Subject: RE: [PHP] Mail From option in PHP.ini


I take it you've also tried setting Reply-To: ??
Same format as From:

Mark

-Original Message-
From: Brian S. Drexler [mailto:[EMAIL PROTECTED] 
Sent: 18 July 2003 16:25
To: 'sven'; php-general
Subject: RE: [PHP] Mail From option in PHP.ini


No, I tried this too.  Here is what I've tried

$hdrs = array(
'From'= ''.$FullName.' '.$Email.'',
'Return-Path'   =  $Email,
//'From'=  $Email,
//'Disposition-Notification-To' = ''.$FullName.'
'.$Email.'',
'Disposition-Notification-To' = $Email,
'Return-Receipt-To' = '' .$FullName.'
'.$Email.'',
//'Return-Path' = $Email,
'Subject' = 'Your Quote # '.$Theresult
);
The commented out ones were also tried


-Original Message-
From: sven [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail From option in PHP.ini


... and how about this?
$headers .= Return-Path: $email_address_from_your_database\r\n;
tell me, if it works.

ciao SVEN


Brian S. Drexler wrote:
 I tried the extra header.  The problem is with the return receipts.
 The mail is being generated by a server other than my main e-mail
 server, so if I want a delivery/read receipt I have to specify a
 From e-mail address or else it will default to the user executing
 the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
 work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group
 so it can only be set in the php.ini or httpd.conf...Thanks for the
 suggestion though...

 -Original Message-
 From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:09 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


 Ok, I want to specify who the mail is coming from by using the
 sendmail_path option in the PHP.ini.  I've added the
 [EMAIL PROTECTED] to it, but I want to be able to dynmaically change
 [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone have
 any ideas how I can do this?  I'm pulling the e-mail I'd like to
 change it to from a MySQL database but can I rewrite the php.ini
 file on the fly or am I stuck.  Any help is greatly appreciated.

 Why not just put it in the extra headers?

 $headers .= From: $email_address_from_your_database\r\n;

 Or you could possibly use ini_set() to change the php.ini setting.

 ---John Holmes...



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

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

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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Mark
From the php website, it appears that the [EMAIL PROTECTED] can be
put in the fifth parameter of the mail() function:

Example 3. Sending mail with extra headers and setting an additional
command line parameter.

mail([EMAIL PROTECTED], the subject, $message,
 From: [EMAIL PROTECTED], [EMAIL PROTECTED]);
 

Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3
this parameter is disabled in safe_mode and the mail() function will
expose a warning message and return FALSE if you're trying to use it.


--- Brian S. Drexler [EMAIL PROTECTED] wrote:
 Yes, sorry...forgot to include that one...:-)
 
 -Original Message-
 From: M.A.Bond [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:31 AM
 To: 'sysadmin'; 'sven'; php-general
 Subject: RE: [PHP] Mail From option in PHP.ini
 
 
 I take it you've also tried setting Reply-To: ??
 Same format as From:
 
 Mark
 
 -Original Message-
 From: Brian S. Drexler [mailto:[EMAIL PROTECTED] 
 Sent: 18 July 2003 16:25
 To: 'sven'; php-general
 Subject: RE: [PHP] Mail From option in PHP.ini
 
 
 No, I tried this too.  Here is what I've tried
 
 $hdrs = array(
   'From'= ''.$FullName.' '.$Email.'',
   'Return-Path'   =  $Email,
   //'From'=  $Email,
   //'Disposition-Notification-To' = ''.$FullName.'
 '.$Email.'',
   'Disposition-Notification-To' = $Email,
   'Return-Receipt-To' = '' .$FullName.'
 '.$Email.'',
   //'Return-Path' = $Email,
   'Subject' = 'Your Quote # '.$Theresult
   );
 The commented out ones were also tried
 
 
 -Original Message-
 From: sven [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini
 
 
 ... and how about this?
 $headers .= Return-Path: $email_address_from_your_database\r\n;
 tell me, if it works.
 
 ciao SVEN
 
 
 Brian S. Drexler wrote:
  I tried the extra header.  The problem is with the return
 receipts.
  The mail is being generated by a server other than my main e-mail
  server, so if I want a delivery/read receipt I have to specify a
  From e-mail address or else it will default to the user
 executing
  the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
  work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM
 group
  so it can only be set in the php.ini or httpd.conf...Thanks for
 the
  suggestion though...
 
  -Original Message-
  From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
  Sent: Friday, July 18, 2003 11:09 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] Mail From option in PHP.ini
 
 
  Ok, I want to specify who the mail is coming from by using the
  sendmail_path option in the PHP.ini.  I've added the
  [EMAIL PROTECTED] to it, but I want to be able to dynmaically
 change
  [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone
 have
  any ideas how I can do this?  I'm pulling the e-mail I'd like to
  change it to from a MySQL database but can I rewrite the php.ini
  file on the fly or am I stuck.  Any help is greatly appreciated.
 
  Why not just put it in the extra headers?
 
  $headers .= From: $email_address_from_your_database\r\n;
 
  Or you could possibly use ini_set() to change the php.ini
 setting.
 
  ---John Holmes...
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Brian S. Drexler
GREAT!!!  I guess I need to RTFM...:-)  Thanks again for all your help
everyone!

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:38 AM
To: [EMAIL PROTECTED]; 'M.A.Bond'; 'sven'; 'php-general'
Subject: RE: [PHP] Mail From option in PHP.ini


From the php website, it appears that the [EMAIL PROTECTED] can be
put in the fifth parameter of the mail() function:

Example 3. Sending mail with extra headers and setting an additional
command line parameter.

mail([EMAIL PROTECTED], the subject, $message,
 From: [EMAIL PROTECTED], [EMAIL PROTECTED]);


Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3
this parameter is disabled in safe_mode and the mail() function will
expose a warning message and return FALSE if you're trying to use it.


--- Brian S. Drexler [EMAIL PROTECTED] wrote:
 Yes, sorry...forgot to include that one...:-)

 -Original Message-
 From: M.A.Bond [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:31 AM
 To: 'sysadmin'; 'sven'; php-general
 Subject: RE: [PHP] Mail From option in PHP.ini


 I take it you've also tried setting Reply-To: ??
 Same format as From:

 Mark

 -Original Message-
 From: Brian S. Drexler [mailto:[EMAIL PROTECTED]
 Sent: 18 July 2003 16:25
 To: 'sven'; php-general
 Subject: RE: [PHP] Mail From option in PHP.ini


 No, I tried this too.  Here is what I've tried

 $hdrs = array(
   'From'= ''.$FullName.' '.$Email.'',
   'Return-Path'   =  $Email,
   //'From'=  $Email,
   //'Disposition-Notification-To' = ''.$FullName.'
 '.$Email.'',
   'Disposition-Notification-To' = $Email,
   'Return-Receipt-To' = '' .$FullName.'
 '.$Email.'',
   //'Return-Path' = $Email,
   'Subject' = 'Your Quote # '.$Theresult
   );
 The commented out ones were also tried


 -Original Message-
 From: sven [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 18, 2003 11:23 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Mail From option in PHP.ini


 ... and how about this?
 $headers .= Return-Path: $email_address_from_your_database\r\n;
 tell me, if it works.

 ciao SVEN


 Brian S. Drexler wrote:
  I tried the extra header.  The problem is with the return
 receipts.
  The mail is being generated by a server other than my main e-mail
  server, so if I want a delivery/read receipt I have to specify a
  From e-mail address or else it will default to the user
 executing
  the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
  work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM
 group
  so it can only be set in the php.ini or httpd.conf...Thanks for
 the
  suggestion though...
 
  -Original Message-
  From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
  Sent: Friday, July 18, 2003 11:09 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] Mail From option in PHP.ini
 
 
  Ok, I want to specify who the mail is coming from by using the
  sendmail_path option in the PHP.ini.  I've added the
  [EMAIL PROTECTED] to it, but I want to be able to dynmaically
 change
  [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone
 have
  any ideas how I can do this?  I'm pulling the e-mail I'd like to
  change it to from a MySQL database but can I rewrite the php.ini
  file on the fly or am I stuck.  Any help is greatly appreciated.
 
  Why not just put it in the extra headers?
 
  $headers .= From: $email_address_from_your_database\r\n;
 
  Or you could possibly use ini_set() to change the php.ini
 setting.
 
  ---John Holmes...



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

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

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



=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a right unless you are willing to fight to
death to defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


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