PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.7.1
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.7.1
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
flywp / views / email.php

email.php in FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel 1.7.1, at views/email.php

117 lines 6.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $settings = flywp()->email->settings();
3 ?>
4 <div class="fw-bg-white fw-shadow fw-rounded fw-sm:rounded-lg fw-mb-6">
5 <div class="">
6 <div class="fw-flex fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-items-center fw-justify-between fw-border-b fw-border-gray-200">
7 <h3 class="fw-text-lg fw-font-semibold fw-leading-6 fw-text-gray-900 fw-m-0">
8 <?php esc_html_e( 'Email Settings', 'flywp' ); ?>
9 </h3>
10
11 <div class="">
12 <a href="<?php echo esc_url( $app_site_url ); ?>/email" target="_blank" class="fw-no-underline fw-text-indigo-600">
13 <span class="dashicons dashicons-external"></span>
14 <?php esc_html_e( 'SMTP Configuration', 'flywp' ); ?>
15 </a>
16 </div>
17 </div>
18
19 <?php if ( isset( $_GET['message'] ) && $_GET['message'] === 'email-settings-saved' ) { ?>
20 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 fly-form-notice">
21 <p><?php esc_html_e( 'Email settings have been saved.', 'flywp' ); ?></p>
22 </div>
23 <?php } ?>
24
25 <form method="POST" action="">
26 <div class="fw-mt-2 fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-text-sm fw-text-gray-500">
27
28 <div class="fw-text-sm fw-border fw-border-indigo-200 fw-rounded fw-px-4 fw-py-4 fw-bg-indigo-100 fw-text-indigo-900 fw-mb-4">
29 <?php esc_html_e( 'With FlyWP, you don’t need a 3rd-party SMTP plugin to send emails. Just configure your connection from the FlyWP site dashboard, all your emails will go through the configured gateway without needing a plugin.', 'flywp' ); ?>
30 </div>
31
32 <div class="fw-mb-4">
33 <label for="from-name" class="fw-font-medium fw-text-gray-700"><?php esc_html_e( 'From Name', 'flywp' ); ?></label>
34 <input type="text" id="from-name" name="from_name" value="<?php echo esc_attr( $settings['from_name'] ); ?>" class="fw-block fw-w-full fw-mt-1 fw-py-2 fw-px-3 fw-border fw-border-gray-200 fw-rounded-md fw-shadow-sm focus:fw-outline-none focus:fw-ring-indigo-500 focus:fw-border-indigo-500 sm:fw-text-sm" />
35
36 <p class="description fw-mt-1">
37 <?php esc_html_e( 'This name will be used as the sender name for all outgoing emails.', 'flywp' ); ?>
38 </p>
39 </div>
40
41 <div class="fw-mb-1">
42 <label for="from-email" class="fw-font-medium fw-text-gray-700"><?php esc_html_e( 'From Email', 'flywp' ); ?></label>
43 <input type="email" id="from-email" name="from_email" value="<?php echo esc_attr( $settings['from_email'] ); ?>" class="fw-block fw-w-full fw-mt-1 fw-py-2 fw-px-3 fw-border fw-border-gray-200 fw-rounded-md fw-shadow-sm focus:fw-outline-none focus:fw-ring-indigo-500 focus:fw-border-indigo-500 sm:fw-text-sm" />
44
45 <p class="description fw-mt-1">
46 <?php esc_html_e( 'This email will be used as the sender email for all outgoing emails.', 'flywp' ); ?>
47 </p>
48 </div>
49 </div>
50
51 <div class="fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-mt-5 fw-bg-gray-50 fw-p-4 fw-border-t fw-rounded-br fw-rounded-bl fw-border-gray-200 fw-text-right">
52 <button type="submit" class="button button-primary button-large !fw-bg-indigo-600 hover:!fw-bg-indigo-700" id="fastcgi-settings-button">
53 <?php esc_html_e( 'Save Changes', 'flywp' ); ?>
54 </button>
55
56 <?php wp_nonce_field( 'flywp-email-settings', 'flywp-email-nonce' ); ?>
57 </div>
58 </form>
59 </div>
60 </div>
61
62 <div class="fw-bg-white fw-shadow fw-rounded fw-sm:rounded-lg fw-mb-6">
63 <div class="">
64 <div class="fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-border-b fw-border-gray-200">
65 <h3 class="fw-text-lg fw-font-semibold fw-leading-6 fw-text-gray-900 fw-m-0">
66 <?php esc_html_e( 'Test Email', 'flywp' ); ?>
67 </h3>
68 </div>
69
70 <?php if ( isset( $_GET['message'] ) && $_GET['message'] === 'test-mail-sent' ) { ?>
71 <div class="fw-bg-green-200 fw-text-green-800 fw-px-4 fw-py-1 fly-form-notice">
72 <p><?php esc_html_e( 'Test email has been sent.', 'flywp' ); ?></p>
73 </div>
74 <?php } ?>
75
76 <?php if ( isset( $_GET['message'] ) && $_GET['message'] === 'test-mail-failed' ) { ?>
77 <div class="fw-bg-red-200 fw-text-red-800 fw-px-4 fw-py-1 fly-form-notice">
78 <p><?php esc_html_e( 'Test email could not be sent.', 'flywp' ); ?></p>
79 </div>
80 <?php } ?>
81
82 <form method="POST" action="">
83 <div class="fw-mt-2 fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-text-sm fw-text-gray-500">
84 <div class="fw-mb-4">
85 <label for="to-email" class="fw-font-medium fw-text-gray-700"><?php esc_html_e( 'Send To', 'flywp' ); ?></label>
86 <input type="email" id="to-email" name="to_email" value="<?php echo esc_attr( wp_get_current_user()->user_email ); ?>" class="fw-block fw-w-full fw-mt-1 fw-py-2 fw-px-3 fw-border fw-border-gray-200 fw-rounded-md fw-shadow-sm focus:fw-outline-none focus:fw-ring-indigo-500 focus:fw-border-indigo-500 sm:fw-text-sm" />
87
88 <p class="description fw-mt-1">
89 <?php esc_html_e( 'Enter email address where the test email will be sent.', 'flywp' ); ?>
90 </p>
91 </div>
92
93 <div class="fw-flex fw-gap-2">
94 <label for="html-email" class="fw-w-9 fw-block fw-switch">
95 <input type="checkbox" id="html-email" name="html_email" class="fw-switch-input" checked="checked" />
96 <span class="fw-switch-toggle"></span>
97 </label>
98
99 <div class="fw-flex-1">
100 <div class="fw-font-medium fw-text-gray-700">
101 <?php esc_html_e( 'Send HTML Email', 'flywp' ); ?>
102 </div>
103 </div>
104 </div>
105 </div>
106
107 <div class="fw-px-6 fw-py-4 fw-fw-sm:p-6 fw-mt-5 fw-bg-gray-50 fw-p-4 fw-border-t fw-rounded-br fw-rounded-bl fw-border-gray-200 fw-text-right">
108 <button type="submit" class="button button-primary button-large !fw-bg-indigo-600 hover:!fw-bg-indigo-700" id="fastcgi-settings-button">
109 <?php esc_html_e( 'Send Test Email', 'flywp' ); ?>
110 </button>
111
112 <?php wp_nonce_field( 'flywp-email-test', 'flywp-email-test-nonce' ); ?>
113 </div>
114 </form>
115 </div>
116 </div>
117