diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-06-03 21:50:17 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-06-03 21:50:17 -0400 |
commit | 4d129b527ee5d3a536849209c2a4e86a64190a5d (patch) | |
tree | 42d053411530244731f1b8960a8a0a221a113f8c /scripts/smtp.js | |
parent | ca999deb0fdaf2592760e28f540554299e420bd3 (diff) | |
download | carpentertutoring-4d129b527ee5d3a536849209c2a4e86a64190a5d.tar.xz carpentertutoring-4d129b527ee5d3a536849209c2a4e86a64190a5d.zip |
done with cobalt migration
Diffstat (limited to 'scripts/smtp.js')
-rw-r--r-- | scripts/smtp.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/smtp.js b/scripts/smtp.js new file mode 100644 index 0000000..09b1a0d --- /dev/null +++ b/scripts/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 |