diff --git a/static/js/app/sending_profiles.js b/static/js/app/sending_profiles.js index da8a4ca6..72edced0 100644 --- a/static/js/app/sending_profiles.js +++ b/static/js/app/sending_profiles.js @@ -1,5 +1,39 @@ var profiles = [] +// Attempts to send a test email by POSTing to /campaigns/ +/*function sendTestEmail() { + var test_email_request = { + template: { name: '' }, + first_name: $("input[name=to_first_name]").val(), + last_name: $("input[name=to_last_name]").val(), + email: $("input[name=to_email]").val(), + position: $("input[name=to_position]").val(), + url: '', + page: { name: '' }, + smtp: { + from_address: $("#from").val(), + host: $("#host").val(), + username: $("#username").val(), + password: $("#password").val(), + ignore_cert_errors: $("#ignore_cert_errors").prop("checked") + } + } + btnHtml = $("#sendTestModalSubmit").html() + $("#sendTestModalSubmit").html(' Sending') + // Send the test email + api.send_test_email(test_email_request) + .success(function(data) { + $("#sendTestEmailModal\\.flashes").empty().append("