Just so I never foget… observe the following test cases -

$foo = 8.37*40*0.175*100; echo $foo.' == '.(int)$foo;
> 5859 == 5858

$foo = 8.37*40*0.175*100; echo $foo.' == '.round($foo);
> 5859 == 5859

I believe that casing to INT will round towards zero as documented in the php docs, I also believe the 5858 number above is because the floating point number is always fractional…

another interesting one -

$foo = 8.37*40*0.175*100; echo $foo.' == '.(int)(string)$foo;
> 5859 == 5859

By casting to string first the floating point element is removed….

Do you run a mail list with phpmailer and want to enable a reply-to path on your email messages while leaving the from address tagged to a bounce handeling email box?

Heres how we cracked it..

Modification to PHPlist, version 2.10.2

open config/config.php and add to the end:

<php/>
  1.  
  2. # START web engineer mod
  3. define("DEFAULT_REPLY_TO","mailbox@domain.com"); // your email address here
  4. # END web engineer mod

Then open admin/sendemaillib.php and insert on line 534 after the following VERBOSE bit:

<php/>
  1.  
  2. if (VERBOSE)
  3. output("Sending text only to $domaincheck");
  4. }
  5. # START web engineer mod
  6. if(defined("DEFAULT_REPLY_TO")){
  7. $mail->AddReplyTo(DEFAULT_REPLY_TO); // hard coded replyto
  8. }
  9. # END web engineer mod

Thats it – should function correctly.

Incidently – we use phpmailer and qmail.


September 2010
S M T W T F S
 1234
567891011
12131415161718
19202122232425
2627282930  
August 2010
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031  
July 2010
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
June 2010
S M T W T F S
 12345
6789101112
13141516171819
20212223242526
27282930  
powered by
wordpress
theme and icons by
web-engineer

©2008 web-engineer™
all rights reserved