Bluehost.com Web Hosting $6.95

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

This is a discussion on RE: [PHP] Mail From option in PHP.ini within the PHP General forums, part of the PHP Programming Forums category; GREAT!!! I guess I need to RTFM...:-) Thanks again for all your help everyone! -----Original Message----- From: Mark [mailto:mark_weinstock@...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-18-2003
Brian S. Drexler
 
Posts: n/a
Default RE: [PHP] Mail From option in PHP.ini

GREAT!!! I guess I need to RTFM...:-) Thanks again for all your help
everyone!

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


>From the php website, it appears that the -fme@myaddress.com 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("nobody@example.com", "the subject", $message,
"From: webmaster@$SERVER_NAME", "-fwebmaster@$SERVER_NAME");


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" <sysadmin@saginawcontrol.com> wrote:
> Yes, sorry...forgot to include that one...:-)
>
> -----Original Message-----
> From: M.A.Bond [mailto:M.A.Bond@open.ac.uk]
> 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:sysadmin@saginawcontrol.com]
> 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:svenie@gmx.li]
> Sent: Friday, July 18, 2003 11:23 AM
> To: php-general@lists.php.net
> 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. uucp@my.server.com 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:holmes072000@charter.net]
> > Sent: Friday, July 18, 2003 11:09 AM
> > To: sysadmin@saginawcontrol.com; php-general@lists.php.net
> > 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
> >> -fme@mydomain.com to it, but I want to be able to dynmaically

> change
> >> me@mydomain.com to you@mydomain.com 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
mark_weinstock@yahoo.com
***************************************
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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0