Introduction

Luminal Template is an extremely flexible and multi-purpose HTML5 template with excellent cross-browser compatibility, design, code quality and more. Luminal SiteBuilder is an exclusive website builder that makes it easy to drastically manipulate Luminal Template without having to deal with hundreds of files and thousands of lines of code. It's possible to build entire websites without manually editing a single line of code. In fact; this entire documentation was created with Luminal Template and Luminal SiteBuilder.

Luminal Documentation guides you through the process of building your website. It contains important information, third party tools and resources, tips to improve your website, solutions to issues you may encounter, answers to questions you may have, video tutorials with commentary, and much more.

Contact form setup

Luminal Template is equipped with fully functional and reliable contact form that allow users to send you emails with attachments, directly from your website. Configuring the contact form to send emails to your email address is easy. Simply follow the steps below.

Adding contact form to your website

The following contact forms are fully functional. You can find them in the Forms category in Luminal SiteBuilder. The second form allows the user to enter a subject for the email. Drag and drop your desired form into your page, footer, or sidebar. Download and add the page containing one of the contact forms below to your website.

formform

Configuring settings in 'configPrivate.php' file

We need to edit configPrivate.php file contained in the php folder of your website. Open the file in a code or text editor. The contents of the file should look similar to the code below.

$mail->isSMTP();
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->isHTML(false);
$mail->SetLanguage("en", "../phpmailer/language/"); // Language

$mail->Host = 'smtp.gmail.com'; // The smtp host of your email provider.
$mail->Username = 'emailaddress@example.com'; // The username of the email account that will receive the email messages. Most likely an email address.
$mail->Password = 'emailAccountPassword'; // The password of the email account that will receive the email messages.
$sendTo = 'emailreceiver@example.com'; // The email address that will receive the email messages. Must correspond with the email account used to login.
$sendToName = 'John Doe'; // Name of the person that will receive the email messages.​​​​​​​

$input1_label = 'NAME:'; // NAME:
$input2_label = 'EMAIL ADDRESS:'; // EMAIL ADDRESS:
$input3_label = 'SUBJECT:'; // SUBJECT:
$fallbackSubject = 'New Email From:'; // NEW EMAIL FROM:

$notice_msg_sent = 'Message Sent'; // Message Sent
$err_msg_required_inputs = 'One or more required fields are empty.'; // One or more required fields are empty.
$err_msg_upload_limit = 'Cannot send message. Attachment is too large.'; // Cannot send message. Attachment is too large.
$err_msg_include_attachments = 'Failed to include attachments. Please try again.'; // Failed to include attachments. Please try again.

To get the contact form working, we may only need to edit the five blue values highlighted above. Use the guide below that shows you what each value represents and edit the values accordingly.

  1. $mail->Host = 'smtp.gmail.com'; - The smtp host of your email provider. Here's a list of smtp servers . Find your email provider in the list and get the smtp host.
  2. $mail->Username = 'emailaddress@example.com'; - The username of the email account that will receive the email messages. Most likely the email address of your email account.​​​​​​
  3. $mail->Password = 'emailAccountPassword'; - The password of the email account that will receive the email messages.​​​​​​​
  4. $sendTo = 'emailreceiver@example.com'; - The email address that will receive the email messages.​ Must correspond with the email account used to log in.
  5. $sendToName = 'John Doe'; - Name of the person that will receive the email messages.​​​​​​​

Keep configPrivate.php file private
configPrivate.php file may now contain your email address and password. Do not share this file with anyone before removing the private information. When you publish your website and upload your files to your online web server, the contents of this file will not be visible by anyone because it's content is never sent to the users browser. Only those with access to your webhosting account and computer can open the file directly and see its content.

Testing contact form

To test the contact form, you must place your website in a server environment such as localhost. On your website visit the page containing the contact form and try sending an email by filling and submitting the form. Once the icon stops spinning on the contact form overlay, check your email inbox for the new email, or for an alert from your email service provider. If you received an email from your email service provider regarding a blocked sing-in attempt after testing your contact form, you need to allow access to less secure apps by following the instructions provided in the email. If no new relevant email appear in your email inbox, try refreshing the page and checking your spam folder. Perform the troubleshooting steps below if you did not receive the form email, or the email from your email service provider regarding a sing-in attempt.

Allow access to less secure apps when using gmail
If your using a gmail account to receive form email, you may need to enable allow access to less secure apps .

Troubleshoot contact form

If there are problems with your contact form, you most likely received an error in the contact form status overlay. Take the appropriate steps below depending on the error you received. Make sure you checked your email inbox for the the unrecognized account login attempt email sent by your email service provider.

  • SMTP Error: Could not authenticate... - Incorrect username or password. You may need to enable Allow access to less secure apps in your Google accounts sign in & security settings , other email services may require the same.
  • SMTP connect() failed... - This error is often caused by wrong SMTP host address, or wrong port number. Make sure the SMTP address for your email provider is correct, If it is and the error persists, change the port number in your file by editing the red value highlighted in the code above. Use this list to find the SMTP host address and the corresponding port number for your email provider.
  • Parse error: syntax error, unexpected... - Syntax error means you most likely made a mistake when editing one or more values. Make sure your values are surrounded by single quotes('). This error can also occur if your password contains single quotes(') within. You will need to escape the single quotes(') by putting a backward slash before each single quote contained in your password. For example:
    ​​​​​​​$mail->Password = 'Example'Password'_with'Quotes'; should become $mail->Password = 'Example\'Password\'_with\'Quotes';

If none of the above solutions worked, please contact support with a detailed description of the issue and error you encountered regarding the contact form.

Changing input values and status messages

You can change the label of each input value that appears in the email. For example the first value highlighted yellow in the code above labels what the user entered in the first input field. You can change the label along with the other yellow highlighted labels.

  • $input1_label = 'NAME:';​​​​​​​ - The first input field.
  • $input2_label = 'EMAIL ADDRESS:'; - The second input field must be where the user enters the email address.
  • $input3_label = 'SUBJECT:'; - If you're using the second contact form shown above, the third input field indicates the subject.
  • $fallbackSubject = 'New Email From:'; - If the user does not enter a subject in the third input field, this one will be used instead.

The form overlay fades in when the form is submitted and shows the status of the form. The values highlighted green are the messages that are shown when something particular happens, feel free to rephrase the status messages.