forked from foonster/postman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_variables.php
executable file
·126 lines (126 loc) · 5.39 KB
/
_variables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
// ===========================================================================
// ===========================================================================
// CONFIGURATION FILE //
// ===========================================================================
// ===========================================================================
// Postman variables
$postman = [
'attach' => false, // allow file uploads to be used by this form
'captcha' => false, // you must include the Google Recaptca JS script to use this.
'error' => '', // place holder
'mta' => [
'service' => '', // enter service name - SENDGRID - PHPMAILER .
'api_key' => '', // required based on service
'id' => '', // required based on service
'pw' => '', // required based on service
],
'return_type' => 'self', // self, redirect, or json - return method will make the final routing
'return_method' => [
'json' => ['type' => 'na'],
'self' => ['message' => 'Message sent'],
'redirect' => ['url' => 'http://www.example.com'],
],
'stop_words' => 'stop-file.txt', // to remove restricted words
'timezone' => 'America/New_York', // if a tz requirement is required
// Google reCaptcha configuration
'google' => [
'site_key' => '',
'secret' => ''
]
];
// Configure the required fields that will be checked before the email will be sent.
$aRequiredFields = array(
'Name' => [
'id' => 'name',
'min-length' => 3,
'scrub' => 'ALPHA'
],
'Email' => [
'id' => 'email',
'length' => 3,
'scrub' => 'EMAIL'
]
);
// Email sent to form reciepent
$aEmail = [
'from' => '', // if blank, postman will use the $_POST['email'] variable to send the email.
'fromname' => '', // if blank, postman will use the $_POST['name'] variable to send the email.
'to' => '',
'cc' => '',
'bcc' => '',
'subject' => $_SERVER['HTTP_HOST'] . ' Form Submission',
'msg-html' => [
'path' => __DIR__ . '/email-html.php',
'character-set' => 'utf-8',
'content-type' => '8bit'
],
'msg-text' => [
'path' => __DIR__ . '/email-text.php',
'character-set' => 'utf-8',
'content-type' => '8bit'
],
'attachments' => []
];
/*
'attachments' => array(
array(
'path' => $_FILES['fupd_1']['tmp_name'],
'name' => $_FILES['fupd_1']['name']
)
)
*/
// Acknowledgement email to person submitting - this function will only fire after the original form submission
// completes without an error.
$aAcknowledgment = array(
'from' => '', // required
'fromname' => '',
'cc' => '',
'bcc' => '',
'subject' => '', // required
'msg-html' => [
'path' => __DIR__ . '/acknowledgment-html.php',
'character-set' => 'utf-8',
'content-type' => '8bit'
],
'msg-text' => [
'path' => __DIR__ . '/acknowledgment-text.php',
'character-set' => 'utf-8',
'content-type' => '8bit'
],
'attachments' => []
);
// =============================================================================
// =============================================================================
// - do not adjust below this line, unless you know what you are doing.
// =============================================================================
// =============================================================================
include __DIR__ . '/_postman.php';
/******************************************************************************\
+------------------------------------------------------------------------------+
| Foonster Publishing Software |
| Copyright (c) 2004 Foonster Technology |
| All rights reserved. |
+------------------------------------------------------------------------------+
| |
| Permission is hereby granted, free of charge, to any person obtaining a copy |
| of this software and associated documentation files (the "Software"), to deal|
| in the Software without restriction, including without limitation the rights |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| copies of the Software, and to permit persons to whom the Software is |
| furnished to do so, subject to the following conditions: |
| |
| The above copyright notice and this permission notice shall be included in |
| all copies or substantial portions of the Software. |
| |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,|
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE|
| SOFTWARE. |
| |
+------------------------------------------------------------------------------+
/ that's all folks
/******************************************************************************/