Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Send cc of Form email to Originator

avery
Registered User
Quote
2023-02-09 20:39:23

I purchased v4.8 yesterday and created a form and named the page contact.php. It tested OK on server and I was able to add a Subject line to form and it is sent to me as a test along with Name, Email Address and Message. I am going to add a line for Phone, too.

At the bottom of the test email sent to me, there is SEND : SEND which is the name of the SEND (submit) button. How do I remove this from being sent in the email to me?

Also, I would like to add code so that the form sends an email cc to the originator. What code should be added to do this?


niko
Moderator
Quote
2023-02-10 07:05:50

In your PHP code, where it says
$text .= "$name : $value\n";

you can add a "if" line in front of that so that it says

if ($name != "SEND")
$text .= "$name : $value\n";

Adjust to whatever the name of your sendbutton is.
And instead of CC, just duplicate the mail line on the button and send it again to another person, like

mail($_POST['email'], "Contact form request", $text);

but that's not a very good idea since then people can misuse your post form to send email from your server to any person.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact