· 6 years ago · Jul 10, 2019, 07:50 PM
1<?php
2
3 /**
4 * Configure contact form
5 */
6 $contact_form_config = array
7 (
8 /**
9 * Email address to receive messages
10 */
11 'recipient' => 'support@rocketnode.nl',
12
13 /**
14 * Email address to send the messages to your recipient
15 * Requires account permissions when used with an SMTP server
16 *
17 * Uses 'recipient' if not defined
18 */
19 'sender' => '',
20
21 /**
22 * Configure subject field
23 * The prefix is prepended to the user subject
24 */
25 'subject' => array
26 (
27 'visible' => true,
28 'required' => true,
29 'prefix' => '[Contact Form]'
30 ),
31
32 /**
33 * SMTP connection configuration
34 * Local mail server is used if not configured
35 *
36 * Setting 'secure' supports false, 'tls' or 'ssl'
37 * Setting 'port' supports 25, 465 or 587
38 */
39 'smtp' => array
40 (
41 'hostname' => '',
42 'username' => '',
43 'password' => '',
44 'secure' => 'tls',
45 'port' => 465
46 ),
47
48 /**
49 * Configure ReCaptcha protection
50 * Requires an API v2 key pair to function
51 *
52 * @see https://developers.google.com/recaptcha
53 */
54 'recaptcha' => array
55 (
56 'site_key' => '',
57 'secret_key' => ''
58 ),
59
60 /**
61 * Configure labels and messages
62 * Can be used to customize or translate items
63 */
64 'translate' => array
65 (
66 'labels' => array
67 (
68 'name' => 'Full Name',
69 'email' => 'Email Address',
70 'subject' => 'Subject',
71 'message' => 'Message'
72 ),
73 'errors' => array
74 (
75 'required' => '%s is required',
76 'invalid' => '%s is invalid'
77 ),
78 'messages' => array
79 (
80 'error' => 'We have encountered an unknown error, please try again.',
81 'success' => 'We have received your message and will get back to you shortly.'
82 )
83 )
84 );
85
86 /**
87 * Load contact form class and its dependencies
88 * Create new class object with given configuration
89 */
90 require __DIR__ . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'contact-form.php';
91 $contact_form = new Contact_Form($contact_form_config);
92
93?>