Re: [PHP] return path of mail function

2006-04-03 Thread Curt Zirzow
On Sun, Apr 02, 2006 at 10:34:48PM -0700, [EMAIL PROTECTED] wrote:
 The same as before:
 
 Return-path: [EMAIL PROTECTED]
 Envelope-to: [EMAIL PROTECTED]
 Delivery-date: Mon, 03 Apr 2006 00:35:34 -0500
 Received: from nobody by amsterdam.servershost.net with local (Exim 4.52)
 
Exim probably isn't allowing it for security reasons.

 ...
 the
   code as below:
  
   $return=test@test.com;
   $orig_sendmail_from = ini_get('sendmail_from');
   ini_set('sendmail_from', $return);

You are better off using the 5th paramater to mail() instead..

 mail($to, $sub, $msg, $headers, -f $return);


The return-path shouldn't nor will be allowed in your standard
$headers var.


Curt.
-- 
cat .signature: No such file or directory

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



Re: [PHP] return path of mail function

2006-04-03 Thread sub

 You are better off using the 5th paramater to mail() instead..
  mail($to, $sub, $msg, $headers, -f $return);


And what if that doesn't work? Is there a 3rd way of doing it that might
work?

~Drew

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



Re: [PHP] return path of mail function

2006-04-03 Thread Chris

[EMAIL PROTECTED] wrote:

You are better off using the 5th paramater to mail() instead..
mail($to, $sub, $msg, $headers, -f $return);




And what if that doesn't work? Is there a 3rd way of doing it that might
work?


Ask your host if they allow you to change it on the fly. Explain what 
you're trying to do.


As Curt said, they might not let you in their exim config. Not much we 
can do if that's the case..



--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP] return path of mail function

2006-04-02 Thread Andrew Darrow
I'm having a problem setting the return-path using the mail function. I seem to 
be able to modify any of the other header information I want, but not this one 
item. 

Here's my code:
$headers =  Return-Path: Test test@test.com\r\n .
   From: Test test@test.com\r\n .
   Reply-To: Test test@test.com\r\n;

$sub=Test sub;
$msg=Test msg;

$to=[EMAIL PROTECTED];

mail($to, $sub, $msg, $headers, '-f test@test.com');




And here's the headers that come in: 
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Sun, 02 Apr 2006 15:19:45 -0500
Received: from nobody by amsterdam.servershost.net with local (Exim 4.52)
 id 1FQ933-00082V-8q
 for [EMAIL PROTECTED]; Sun, 02 Apr 2006 15:19:45 -0500
To: [EMAIL PROTECTED]
Subject: Test sub
X-PHP-Script: www.drewpydraws.com/crap.php for ip address
From: Test test@test.com
Reply-To: Test test@test.com
Message-Id: [EMAIL PROTECTED]
Date: Sun, 02 Apr 2006 15:19:45 -0500
X-Antivirus: AVG for E-mail 7.1.385 [268.3.4/299]
Mime-Version: 1.0
Content-Type: text/plain

The From and Reply-To get set correctly so it works fine on e-mail clients, 
but some of the messages will be delievered to cell phones that display the 
return-path instead of from and reply-to. 

Any thoughts on how I would go about setting the value for Return-Path?

~Drew
www.drewpydraws.com

Re: [PHP] return path of mail function

2006-04-02 Thread Chris

Andrew Darrow wrote:
I'm having a problem setting the return-path using the mail function. I seem to be able to modify any of the other header information I want, but not this one item. 


Here's my code:
$headers =  Return-Path: Test test@test.com\r\n .
   From: Test test@test.com\r\n .
   Reply-To: Test test@test.com\r\n;

$sub=Test sub;
$msg=Test msg;

$to=[EMAIL PROTECTED];

mail($to, $sub, $msg, $headers, '-f test@test.com');


No space between -f and the email.

I assume your host doesn't have safe-mode on? (You can't use this method 
if so).


Check a phpinfo page and look for:

sendmail_from

If that's set, this way won't do it either, you'll need to do:

$orig_sendmail_from = ini_get('sendmail_from');

// this should match what phpinfo tells you but replace the email. so 
might be '-f'.$return_path

ini_set('sendmail_from', $return_path);

mail($to, $sub, $msg, $headers);

and leave off the last parameter.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] return path of mail function

2006-04-02 Thread Chris

[EMAIL PROTECTED] wrote:

Safe mode is indeed off and sendmail_from has no value. I've modified the
code as below:

$return=test@test.com;
$orig_sendmail_from = ini_get('sendmail_from');
ini_set('sendmail_from', $return);

$headers =  From: Test test@test.com\r\n .
   Reply-To: Test test@test.com\r\n;

$sub=Test sub;
$msg=Test msg;
$to=[EMAIL PROTECTED];

mail($to, $sub, $msg, $headers);


What headers do you get when you do this?

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] return path of mail function

2006-04-02 Thread sub
The same as before:

Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Mon, 03 Apr 2006 00:35:34 -0500
Received: from nobody by amsterdam.servershost.net with local (Exim 4.52)
 id 1FQHiw-Kf-E4
 for [EMAIL PROTECTED]; Mon, 03 Apr 2006 00:35:34 -0500
To: [EMAIL PROTECTED]
Subject: Test sub
X-PHP-Script: www.drewpydraws.com/crap.php for ip address
From: Test test@test.com
Reply-To: Test test@test.com
Message-Id: [EMAIL PROTECTED]
Date: Mon, 03 Apr 2006 00:35:34 -0500
X-Antivirus: AVG for E-mail 7.1.385 [268.3.4/299]
Mime-Version: 1.0
Content-Type: text/plain


~Drew
www.drewpydraws.com
- Original Message - 
From: Chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Sunday, April 02, 2006 10:31 PM
Subject: Re: [PHP] return path of mail function


 [EMAIL PROTECTED] wrote:
  Safe mode is indeed off and sendmail_from has no value. I've modified
the
  code as below:
 
  $return=test@test.com;
  $orig_sendmail_from = ini_get('sendmail_from');
  ini_set('sendmail_from', $return);
 
  $headers =  From: Test test@test.com\r\n .
 Reply-To: Test test@test.com\r\n;
 
  $sub=Test sub;
  $msg=Test msg;
  $to=[EMAIL PROTECTED];
 
  mail($to, $sub, $msg, $headers);

 What headers do you get when you do this?


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



Re: [PHP] return path of mail function

2006-04-02 Thread sub
Safe mode is indeed off and sendmail_from has no value. I've modified the
code as below:

$return=test@test.com;
$orig_sendmail_from = ini_get('sendmail_from');
ini_set('sendmail_from', $return);

$headers =  From: Test test@test.com\r\n .
   Reply-To: Test test@test.com\r\n;

$sub=Test sub;
$msg=Test msg;
$to=[EMAIL PROTECTED];

mail($to, $sub, $msg, $headers);

Still doesn't work. I also tried modifying the5th argument as
[EMAIL PROTECTED] and [EMAIL PROTECTED] neither of those worked either.

I'm not sure what i'm missing here. If it would help to view the phpinfo
from my host, you may do so here http://drewpydraws.com/phpinfo.php

~Drew
www.drewpydraws.com

- Original Message - 
From: Chris [EMAIL PROTECTED]
To: Andrew Darrow [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Sunday, April 02, 2006 5:02 PM
Subject: Re: [PHP] return path of mail function


 Andrew Darrow wrote:
  I'm having a problem setting the return-path using the mail function. I
seem to be able to modify any of the other header information I want, but
not this one item.
 
  Here's my code:
  $headers =  Return-Path: Test test@test.com\r\n .
 From: Test test@test.com\r\n .
 Reply-To: Test test@test.com\r\n;
 
  $sub=Test sub;
  $msg=Test msg;
 
  $to=[EMAIL PROTECTED];
 
  mail($to, $sub, $msg, $headers, '-f test@test.com');

 No space between -f and the email.

 I assume your host doesn't have safe-mode on? (You can't use this method
 if so).

 Check a phpinfo page and look for:

 sendmail_from

 If that's set, this way won't do it either, you'll need to do:

 $orig_sendmail_from = ini_get('sendmail_from');

 // this should match what phpinfo tells you but replace the email. so
 might be '-f'.$return_path
 ini_set('sendmail_from', $return_path);

 mail($to, $sub, $msg, $headers);

 and leave off the last parameter.

 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/

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





 -- 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 3/31/2006



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



Re: [PHP] Return Path

2005-08-06 Thread Sebastian

try using -f

mail($toemail, $subject, $message, $from, '-f [EMAIL PROTECTED]');

[EMAIL PROTECTED] wrote:

I don't seem to be able to set the return path using the mail() function. I can't figure out why from will let me set it, but not the return path. 


$headers = 'From: [EMAIL PROTECTED]' . \r\n .
  'Return-path: [EMAIL PROTECTED]' . \r\n .
  'X-Mailer: PHP/' . phpversion();

mail($email, $subject, $message, $headers);


Any thoughts?

Andrew Darrow
Kronos1 Productions
www.pudlz.com


 




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.1/64 - Release Date: 8/4/2005

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



Re: [PHP] Return Path [SOLVED]

2005-08-06 Thread sub
Works great. Thank you.

Although I swear I tried that last night. Eh I probably messed something up.

Andrew Darrow
Kronos1 Productions
www.pudlz.com


- Original Message - 
From: Sebastian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Saturday, August 06, 2005 6:12 AM
Subject: Re: [PHP] Return Path


 try using -f

 mail($toemail, $subject, $message, $from, '-f [EMAIL PROTECTED]');

 [EMAIL PROTECTED] wrote:

 I don't seem to be able to set the return path using the mail()
function. I can't figure out why from will let me set it, but not the
return path.
 
 $headers = 'From: [EMAIL PROTECTED]' . \r\n .
'Return-path: [EMAIL PROTECTED]' . \r\n .
'X-Mailer: PHP/' . phpversion();
 
 mail($email, $subject, $message, $headers);
 
 
 Any thoughts?
 
 Andrew Darrow
 Kronos1 Productions
 www.pudlz.com
 
 
 
 


 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.338 / Virus Database: 267.10.1/64 - Release Date: 8/4/2005

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





 -- 
 No virus found in this incoming message.
 Checked by AVG Anti-Virus.
 Version: 7.0.338 / Virus Database: 267.10.1/64 - Release Date: 8/4/2005



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



[PHP] Return Path

2005-08-05 Thread sub
I don't seem to be able to set the return path using the mail() function. I 
can't figure out why from will let me set it, but not the return path. 

$headers = 'From: [EMAIL PROTECTED]' . \r\n .
   'Return-path: [EMAIL PROTECTED]' . \r\n .
   'X-Mailer: PHP/' . phpversion();

mail($email, $subject, $message, $headers);


Any thoughts?

Andrew Darrow
Kronos1 Productions
www.pudlz.com



Re: [PHP] Return-Path header and sending email with php

2004-01-26 Thread Marek Kilimajer
You can use a class that sends mails by connecting directly to smtp 
server, e.g. http://www.phpclasses.org/mimemessage

Chris Balay wrote:
Good Day Coders -

I have built a newsletter program with php. It sends out an e-mail to a 
couple thousand subcribers every day. All works well. My problem is that 
I have know way of finding out which e-mails are not being delivered 
successfully.

My code is as follows:

$to = stripslashes($row3[email_address]);
   
$subject = stripslashes($row3[name]).'s Curmudgeon-Online for 
.date(F j, Y);
   
$message = stripslashes($row3[name]).'s Curmudgeon-Online daily 
e-mail for .date(F j, Y).

--

.$quotes;
   
$headers = From: The Curmudgeon-Online 
[EMAIL PROTECTED]\r\n;
$headers .= Return-Path: [EMAIL PROTECTED];
$headers .= Reply-To: [EMAIL PROTECTED]\r\n;

mail($to, $subject, $message, $headers);

This generated the following headers:

Return-Path: [EMAIL PROTECTED]
Received: from [127.0.0.1] (HELO ftp.pezcandyinc.com)
  by whiteplume.net (CommuniGate Pro SMTP 4.1.5)
  with ESMTP id 1692872 for [EMAIL PROTECTED]; Sun, 25 Jan 2004 
04:03:25 -0500
Received: by ftp.pezcandyinc.com (8.12.9/8.12.9/Submit) id i0P93PqY017724;
Sun, 25 Jan 2004 04:03:25 -0500 (EST)
Date: Sun, 25 Jan 2004 04:03:25 -0500 (EST)
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Chris Balay's Curmudgeon-Online for January 25, 2004
From: The Curmudgeon-Online [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

as a result any undeliverd messages are routed to 
[EMAIL PROTECTED], an address that does not exists.

Is there any way to change the return-path header?
Yours,
Chris Balay

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


[PHP] Return-Path header and sending email with php

2004-01-25 Thread Chris Balay
Good Day Coders -

I have built a newsletter program with php. It sends out an e-mail to a couple 
thousand subcribers every day. All works well. My problem is that I have know 
way of finding out which e-mails are not being delivered successfully.

My code is as follows:

$to = stripslashes($row3[email_address]);
			
$subject = stripslashes($row3[name]).'s Curmudgeon-Online for .date(F j, 
Y);
			
$message = stripslashes($row3[name]).'s Curmudgeon-Online daily e-mail for 
.date(F j, Y).

--

.$quotes;

$headers = From: The Curmudgeon-Online [EMAIL PROTECTED]\r\n;
$headers .= Return-Path: [EMAIL PROTECTED];
$headers .= Reply-To: [EMAIL PROTECTED]\r\n;

mail($to, $subject, $message, $headers);
This generated the following headers:

Return-Path: [EMAIL PROTECTED]
Received: from [127.0.0.1] (HELO ftp.pezcandyinc.com)
  by whiteplume.net (CommuniGate Pro SMTP 4.1.5)
  with ESMTP id 1692872 for [EMAIL PROTECTED]; Sun, 25 Jan 2004 04:03:25 
-0500
Received: by ftp.pezcandyinc.com (8.12.9/8.12.9/Submit) id i0P93PqY017724;
	Sun, 25 Jan 2004 04:03:25 -0500 (EST)
Date: Sun, 25 Jan 2004 04:03:25 -0500 (EST)
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Chris Balay's Curmudgeon-Online for January 25, 2004
From: The Curmudgeon-Online [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

as a result any undeliverd messages are routed to [EMAIL PROTECTED], an 
address that does not exists.

Is there any way to change the return-path header? 

Yours,

Chris Balay

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


Re: [PHP] Return-Path header and sending email with php

2004-01-25 Thread David T-G
Chris --

You have started a new thread by taking an existing message and replying
to it while merely changing the Subject: line.

That is bad, because it breaks threading.  Whenever you reply to a
message, your mail client generates a References: header that tells all
recipients to which posting(s) your posting refers.  A mail client uses
this information to build a thread tree of the postings so that it is
easy to see just how they relate to each other.

With your posting style you successfully torpedoed this useful feature;
your posting shows up within an existing thread even though it is
completely unrelated.

Always do a fresh post when you want to start a new thread.  That means
that you do not select any sort of Reply when you start your message.
You can save the list address in your address book (or equivalent) for
convenience.

...and then Chris Balay said...
% 
% Good Day Coders -

Hello!


% 
% I have built a newsletter program with php. It sends out an e-mail to a 
% couple thousand subcribers every day. All works well. My problem is that I 

Interesting.  I'm always astonished the people use php for mailing list
work instead of just using mailing list software.  But I'm glad it works.


% have know way of finding out which e-mails are not being delivered 
% successfully.

If you're running under safe mode, you're apparently stuck.  If you're
not, you need to go back and read the manual again.  It's either the
second gunman on the grassy knoll or the fifth parameter ;-)


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] Return path (php/sendmail)

2002-04-12 Thread Anthony Rodriguez

Does Reply-To works for you?

My Web hosting provider runs php (4.1.1) / sendmail (8.10.2) / apache 
(1.3.20) / linux red hat (6.2) and I don't get bounced e-mails.

Any suggestions?

Tony
([EMAIL PROTECTED])


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




Re: [PHP] Return path (php/sendmail)

2002-04-12 Thread Analysis Solutions

Hi Anthony:

On Fri, Apr 12, 2002 at 03:27:14AM -0400, Anthony Rodriguez wrote:

 My Web hosting provider runs php (4.1.1) / sendmail (8.10.2) / apache
 (1.3.20) / linux red hat (6.2) and I don't get bounced e-mails.
 
Put a from line in the additional headers argument:
   
   mail($To, $Subject, $Body, From: $From);

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Return-Path

2002-04-05 Thread Anthony Rodriguez

Can you help me?

When I call the following script:

(1) ?php
(2) mail([EMAIL PROTECTED],
(3)  Test,
(4)  Test,
(5)  From:SBW Research [EMAIL PROTECTED]\r\n,
(6)  Return-Path:[EMAIL PROTECTED]\r\n);
(7) exit;
(8) ?

I get the following error message:

Warning: Wrong parameter count for mail() in ... (file_name) ... on line 6.

By the way, I tried it with and w/o the \r.

Any suggestions?

Thanks!

Anthony F. Rodriguez
([EMAIL PROTECTED])


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




Re: [PHP] Return-Path

2002-04-05 Thread Jason Wong

On Friday 05 April 2002 20:49, Anthony Rodriguez wrote:
 Can you help me?

 When I call the following script:

 (1) ?php
 (2) mail([EMAIL PROTECTED],
 (3)  Test,
 (4)  Test,
 (5)  From:SBW Research [EMAIL PROTECTED]\r\n,
 (6)  Return-Path:[EMAIL PROTECTED]\r\n);
 (7) exit;
 (8) ?

 I get the following error message:

 Warning: Wrong parameter count for mail() in ... (file_name) ... on line 6.

 By the way, I tried it with and w/o the \r.

 Any suggestions?

mail() is only supposed to take 4 parameters, but you're trying to feed it 
with 5.

The last parameter (the 4th) can take any number of headers separated by by 
'\r\n'. So try:

 (1) ?php
 (2) mail([EMAIL PROTECTED],
 (3)  Test,
 (4)  Test,
 (5)  From:SBW Research [EMAIL PROTECTED]\r\n.
 (6)  Return-Path:[EMAIL PROTECTED]\r\n);
 (7) exit;
 (8) ?



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
CFC stole it, fair and square.
-- Tim Hahn
*/

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