If you look at the source of smtpjs.com , it creates the URL of the mail request and then adds it to the document inside the <link>
. This will not work on secure pages.
Email = { send: function (t, e, o, n, d, r, c) { var a = Math.floor(1e6 * Math.random() + 1), m = "http://smtpjs.com/smtp.aspx?"; m += "From=" + t, m += "&to=" + e, m += "&Subject=" + encodeURIComponent(o), m += "&Body=" + encodeURIComponent(n), void 0 == d.token ? (m += "&Host=" + d, m += "&Username=" + r, m += "&Password=" + c, m += "&Action=Send") : (m += "&SecureToken=" + d.token, m += "&Action=SendFromStored"), m += "&cachebuster=" + a, Email.addScript(m) }, addScript: function (t) { var e = document.createElement("link"); e.setAttribute("rel", "stylesheet"), e.setAttribute("type", "text/xml"), e.setAttribute("href", t), document.body.appendChild(e) } };
You can use most of the above code ... save the send
function, but replace the addScript
function with GM_xmlhttpRequest
to send data to their server.
source share