PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Core/Util/MailConfig.php +11 -10 3.1.03.3.1 View file →
@@ -27,29 +27,30 @@
27 27 {
28 28 $integrationHandler = new IntegrationHandler(0);
29 29 $formIntegrations = $integrationHandler->getAllIntegration('mail', 'smtp', 1);
30 30 if (!isset($formIntegrations->errors['result_empty'])) {
31 - if (1 === (int) $formIntegrations[0]->status) {
32 - $integration_details = json_decode($formIntegrations[0]->integration_details);
31 + $integrationRow = Utilities::firstRow($formIntegrations);
32 + if ($integrationRow && 1 === (int) $integrationRow->status) {
33 + $integration_details = Utilities::jsonObj($integrationRow->integration_details ?? '');
33 34 $phpmailer->Mailer = 'smtp';
34 - $phpmailer->Host = $integration_details->smtp_host;
35 + $phpmailer->Host = $integration_details->smtp_host ?? '';
35 36 $phpmailer->SMTPAuth = true;
36 37 if (!empty($integration_details->re_email_address)) {
37 38 $phpmailer->addReplyTo($integration_details->re_email_address, 'reply-to');
38 39 }
39 - $phpmailer->Port = $integration_details->port;
40 - $phpmailer->Username = $integration_details->smtp_user_name;
41 - $phpmailer->Password = $integration_details->smtp_password;
42 - $phpmailer->SMTPSecure = $integration_details->encryption;
40 + $phpmailer->Port = $integration_details->port ?? '';
41 + $phpmailer->Username = $integration_details->smtp_user_name ?? '';
42 + $phpmailer->Password = $integration_details->smtp_password ?? '';
43 + $phpmailer->SMTPSecure = $integration_details->encryption ?? '';
43 44 // $phpmailer->SMTPDebug = 1;
44 45 // $phpmailer->Debugoutput = 'error_log';
45 - $phpmailer->From = $integration_details->form_email_address;
46 - $phpmailer->Sender = $integration_details->form_email_address;
46 + $phpmailer->From = $integration_details->form_email_address ?? '';
47 + $phpmailer->Sender = $integration_details->form_email_address ?? '';
47 48 if (isset($this->config['from_email']) && !empty($this->config['from_email'])) {
48 49 $phpmailer->From = $this->config['from_email'];
49 50 $phpmailer->Sender = $this->config['from_email'];
50 51 }
51 - $from_name = $integration_details->form_name;
52 + $from_name = $integration_details->form_name ?? '';
52 53 if (isset($this->config['from_name']) && !empty($this->config['from_name'])) {
53 54 $from_name = $this->config['from_name'];
54 55 }
55 56 $phpmailer->FromName = $from_name;