Developer Support »

Send a CC email based on form input  (See more user questions)

Worked like a charm! :) thank you!

Regards,

> FormToEmail.com wrote:
> Hi .
>
> You can ask questions any time you like!
>
> There isn't a facility for that in the script but you can add some
> code to do it. Here's the code:
>
> if(isset($_REQUEST['email2']) && !empty($_REQUEST['email2']))
> {
>
> $headers .= PHP_EOL;
> $headers .= "Cc: <{$_REQUEST['email2']}>";
>
> }
>
> Put it in after this piece of code:
>
> {
>
> $from_name = "";
>
> if(isset($_REQUEST['name']) && !empty($_REQUEST['name'])){$from_name =
> stripslashes($_REQUEST['name']); if($encode_name_subject){$from_name =
> "=?{$character_set}?B?".base64_encode($_REQUEST['name'])."?=";}}
>
> $headers = "From: {$from_name} <{$_REQUEST['email']}>";
> $headers .= PHP_EOL;
> $headers .= "MIME-Version: 1.0";
>
> }
>
> I have attached a new script for you, with the extra code in it. Make
> sure you have named the form field "email2".
>
> Any questions, just let me know.
>
> Best wishes.
>
> Charles Sweeney
> https://formtoemail.com
> The world's easiest feedback script!
>
> ----- Original Message ----- From:
> Sent: Friday, June 18, 2010 3:52 PM
> Subject: Re: FormToEmail-Pro script
>
>
>> Hi Charles,
>>
>> Hate to bother you, but I have a request from a client. They would
>> like to have a field in the form: ff<email2> and have the form be
>> cc'd to this email address. Is this possible?
>>
>> Thank you in advance for your time.
>>
>> Best regards