summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail/postman_smtp.js
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-11-25 07:50:30 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-11-25 07:50:30 +0000
commit907ce8c044159ca8da6ccce3ec5362ac61e7c142 (patch)
tree4e4b83a3aa041a1826e4ac876b001195fce3f7c2 /Postman/Postman-Mail/postman_smtp.js
parenta41b9219a66f4018dc581f561fbe3fedd24e73f2 (diff)
downloadPost-SMTP-907ce8c044159ca8da6ccce3ec5362ac61e7c142.zip
deleted by mistake
Diffstat (limited to 'Postman/Postman-Mail/postman_smtp.js')
-rw-r--r--Postman/Postman-Mail/postman_smtp.js89
1 files changed, 0 insertions, 89 deletions
diff --git a/Postman/Postman-Mail/postman_smtp.js b/Postman/Postman-Mail/postman_smtp.js
deleted file mode 100644
index 2e6d18f..0000000
--- a/Postman/Postman-Mail/postman_smtp.js
+++ /dev/null
@@ -1,89 +0,0 @@
-jQuery(document).ready(function() {
- postmanSmtpInit();
-});
-
-function postmanSmtpInit() {
- // define the PostmanMandrill class
- var PostmanSmtp = function(name) {
- this.slug = name;
- }
-
- // behavior for handling the user's transport change
- PostmanSmtp.prototype.handleTransportChange = function(transportName) {
- if (transportName == 'default') {
- hide('div.transport_setting');
- hide('div.authentication_setting');
- } else if (transportName == this.slug) {
- show('div#smtp_config');
- var $choice = jQuery('select#input_auth_type').val();
- if ($choice == 'none') {
- hide('div.authentication_setting');
- } else if ($choice != 'oauth2') {
- show('div#password_settings');
- hide('div.authentication_setting.non-basic');
- } else {
- hide('div.authentication_setting.non-oauth2');
- show('div#oauth_settings');
- }
- }
- }
-
- // behavior for handling the wizard configuration from the
- // server (after the port test)
- PostmanSmtp.prototype.handleConfigurationResponse = function(response) {
- var transportName = response.configuration.transport_type;
- if (!(transportName == this.slug || transportName == 'gmail_api')) {
- hide('.wizard-auth-oauth2');
- hide('.wizard-auth-basic');
- return;
- }
- console.debug('prepping screen for smtp transport ');
- if (response.configuration.display_auth == 'oauth2') {
- show('p#wizard_oauth2_help');
- jQuery('p#wizard_oauth2_help').html(
- response.configuration.help_text);
- jQuery(postman_redirect_url_el).val(
- response.configuration.redirect_url);
- jQuery('#input_oauth_callback_domain').val(
- response.configuration.callback_domain);
- jQuery('#client_id').html(response.configuration.client_id_label);
- jQuery('#client_secret').html(
- response.configuration.client_secret_label);
- jQuery('#redirect_url').html(
- response.configuration.redirect_url_label);
- jQuery('#callback_domain').html(
- response.configuration.callback_domain_label);
- }
- redirectUrlWarning = response.configuration.dot_notation_url;
- jQuery('#input_transport_type').val(
- response.configuration.transport_type);
- jQuery('#input_auth_type').val(response.configuration.auth_type);
- jQuery('#input_enc_type').val(response.configuration.enc_type);
- jQuery('#input_port').val(response.configuration.port);
-
- // hide the fields we don't use so validation
- // will work
- if (response.configuration.display_auth == 'oauth2') {
- // where authentication is oauth2
- show('.wizard-auth-oauth2');
- hide('.wizard-auth-basic');
- } else if (response.configuration.display_auth == 'password') {
- // where authentication is password
- hide('.wizard-auth-oauth2');
- show('.wizard-auth-basic');
- } else {
- // where authentication is none
- hide('.wizard-auth-oauth2');
- hide('.wizard-auth-basic');
- }
- }
-
- // add this class to the global transports
- var transport = new PostmanSmtp('smtp');
- transports.push(transport);
-
- // since we are initialize the screen, check if needs to be
- // modded by this transport
- var transportName = jQuery('select#input_transport_type').val();
- transport.handleTransportChange(transportName);
-} \ No newline at end of file