summaryrefslogtreecommitdiff
path: root/_old/src/js/smtp.js
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-06-02 21:54:44 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-06-02 21:54:44 -0400
commite8ab11225a306225d2be16c4464e68a4ad464918 (patch)
tree9fa3c7071f6f27cb0305b0ce6522a606ded864a3 /_old/src/js/smtp.js
parent8f3bc0a5a3640be89da2815ca32fa63150f8ec18 (diff)
downloadcarpentertutoring-e8ab11225a306225d2be16c4464e68a4ad464918.tar.xz
carpentertutoring-e8ab11225a306225d2be16c4464e68a4ad464918.zip
basic cobalt layout
Diffstat (limited to '_old/src/js/smtp.js')
-rw-r--r--_old/src/js/smtp.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/_old/src/js/smtp.js b/_old/src/js/smtp.js
new file mode 100644
index 0000000..09b1a0d
--- /dev/null
+++ b/_old/src/js/smtp.js
@@ -0,0 +1,2 @@
+/* SmtpJS.com - v3.0.0 */
+var Email = { send: function (a) { return new Promise(function (n, e) { a.nocache = Math.floor(1e6 * Math.random() + 1), a.Action = "Send"; var t = JSON.stringify(a); Email.ajaxPost("https://smtpjs.com/v3/smtpjs.aspx?", t, function (e) { n(e) }) }) }, ajaxPost: function (e, n, t) { var a = Email.createCORSRequest("POST", e); a.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), a.onload = function () { var e = a.responseText; null != t && t(e) }, a.send(n) }, ajax: function (e, n) { var t = Email.createCORSRequest("GET", e); t.onload = function () { var e = t.responseText; null != n && n(e) }, t.send() }, createCORSRequest: function (e, n) { var t = new XMLHttpRequest; return "withCredentials" in t ? t.open(e, n, !0) : "undefined" != typeof XDomainRequest ? (t = new XDomainRequest).open(e, n) : t = null, t } }; \ No newline at end of file