You can send emails using the PHP script using the Contact Form Element for HTML export.
The PHP script allows sending emails without using external resources. Please note that sending emails is performed on the server side. Therefore, you need to have a server configured to send emails. The following information contains information about configuring your server to send emails.
Remote Server And GoDaddy Hosting
The Nicepage script uses the PHP Mail Function. Therefore, PHP should be installed and configured correctly in your server's php.ini file.
Please read the additional information about PHP configuration in Article 1 or Article 2.
Usually, hosting providers already have PHP configured correctly. For example, email sending works by default on GoDaddy Hosting. Therefore, you can use the PHP script generated by Nicepage.
Localhost Settings
You must manually configure the server if you are running a project on your localhost (XAMPP, WAMP) and need to test email sending while developing.
Please read the following articles:
Also, configure the "Less secure apps" settings in the Google Security Settings to avoid problems with email sending.
General Recommendation
We recommend using the reCAPTCHA integration to avoid spam submitted from the Form.
Read more about other Contact Form Submit Options.
CC & BCC Fields
For the Contact Form Element, the "Send Emails with PHP Script," you can fill out the Copy (CC) and Hidden Copy (BCC) fields.
NOTE: This option is supported for the PHP script provided by the Nicepage Team.
You can send emails using the PHP script using the Contact Form Element for HTML export.
The PHP script allows sending emails without using external resources. Please note that sending emails is performed on the server side. Therefore, you need to have a server configured to send emails. The following information contains information about configuring your server to send emails.
!send-email-with-php-script.png!
## Remote Server And GoDaddy Hosting
The Nicepage script uses the PHP Mail Function. Therefore, PHP should be installed and configured correctly in your server's php.ini file.
Please read the additional information about PHP configuration in [Article 1](https://developernote.com/2012/07/how-i-configured-sendmail-for-php-on-ubuntu-server-12-04/) or [Article 2](https://pepipost.com/tutorials/sendmail-in-php-complete-guide/).
Usually, hosting providers already have PHP configured correctly. For example, email sending works by default on GoDaddy Hosting. Therefore, you can use the PHP script generated by Nicepage.
## Localhost Settings
You must manually configure the server if you are running a project on your localhost (XAMPP, WAMP) and need to test email sending while developing.
Please read the following articles:
- [How To Send Email From Localhost Using PHP](https://www.phpflow.com/php/how-to-send-email-from-localhost-using-php/)
- [How to Send Mail from Localhost XAMPP Using Gmail](https://meetanshi.com/blog/send-mail-from-localhost-xampp-using-gmail/)
Also, configure the "Less secure apps" settings in the Google Security Settings to avoid problems with email sending.
## General Recommendation
We recommend using the [reCAPTCHA](https://nicepage.com/doc/article/61415/recaptcha-integration) integration to avoid spam submitted from the Form.
Read more about other [Contact Form Submit Options](page:4216).
## CC & BCC Fields
For the Contact Form Element, the "Send Emails with PHP Script," you can fill out the Copy (CC) and Hidden Copy (BCC) fields.
NOTE: This option is supported for the PHP script provided by the Nicepage Team.
!сс-bcc-php-script-submission.png!
##