[FX.php List] Multiple recipients for Fx email error routine?

Gareth Evans gareth.evans at schawk.com
Mon Jun 15 09:01:48 MDT 2009


You should be able to just supply a comma delimited string of addresses:

$webmasterEmailAddress = 'user at example.com, anotheruser at example.com';

-- 
GARETH EVANS


> From: Steve Winter <steve at bluecrocodile.co.nz>
> Reply-To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Date: Mon, 15 Jun 2009 15:45:51 +0100
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Subject: Re: [FX.php List] Multiple recipients for Fx email error routine?
> 
> Hi Jonathan,
> 
> Well given that the mailing routine within FX uses the PHP mail()
> function, then you could modify that to include a fourth parameter
> which included a CC... In my v of FX (4.2) lines 23- 37 include this
> data/function;
> 
> $webmasterEmailAddress = 'webmaster at yourdomain.com';
> $emailFromAddress = 'you at yourdomain.com';
> 
> function EmailError ($errorText)
> {
>      global $webmasterEmailAddress;
>      global $emailFromAddress;
> 
>      if (EMAIL_ERROR_MESSAGES) {
>          $emailSubject = "PHP Server Error";
>          $emailMessage = "The following error just occured:\r\n\r
> \nMessage: {$errorText}\r\n\r\n**This is an automated message**";
>          $emailStatus = mail($webmasterEmailAddress, $emailSubject,
> $emailMessage, "From: $emailFromAddress\r\n");
>      }
> }
> 
> The fourth parameter in mail()  is the optional headers parameter,
> which you could expand to add in a CC, so you could define a new
> variable $ccEmail, and include that so that the headers becomes "From:
> $emailFromAddress\r\n CC: $ccEmail\r\n"
> 
> Don't forget to include the new $ccEmail variable in the global
> declaration if you declare it with the others at the top and outside
> the EmailError function...
> 
> HTH
> 
> Cheers
> Steve
> 
> On 15 Jun 2009, at 15:26, Jonathan Schwartz wrote:
> 
>> Hi folks,
>> 
>> I want to be able to have FX.php's built in email error routine send
>> to 2 recipients, not just one.
>> 
>> Anyone done this?
>> 
>> Thx
>> 
>> Jonathan
>> -- 
>> Jonathan Schwartz
>> Exit 445 Group
>> jonathan at exit445.com
>> http://www.exit445.com
>> 415-370-5011
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> 
> Steve Winter
> steve at bluecrocodile.co.nz
> m: +44 77 7852 4776
> 3 Calshot Court, Channel Way
> Ocean Village, Southampton SO14 3GR
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list