Summary

  • Overview
  • Remote Server And GoDaddy Hosting
  • Localhost Settings
  • General Recommendation
  • CC & BCC Fields

Overview

You can send emails with the PHP script using the Contact Form Element for the 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 the php.ini file on your server.

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 is working by default on GoDaddy Hosting. Therefore you can use the PHP script generated with Nicepage.

Localhost Settings

If you are running a project on your localhost (XAMPP, WAMP) and need to test email sending while developing, you must manually configure the server.

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 Nicepage Team.

сс-bcc-php-script-submission.png

## Summary - Overview - Remote Server And GoDaddy Hosting - Localhost Settings - General Recommendation - CC & BCC Fields ## Overview You can send emails with the PHP script using the Contact Form Element for the 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 the php.ini file on your server. 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 is working by default on GoDaddy Hosting. Therefore you can use the PHP script generated with Nicepage. ## Localhost Settings If you are running a project on your localhost (XAMPP, WAMP) and need to test email sending while developing, you must manually configure the server. 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 Nicepage Team. !сс-bcc-php-script-submission.png! ##