Home
> Uncategorized > Send #email via #JQuery
Send #email via #JQuery
This was bit of an aborted project, since I see that the JQuery Plugin registry is now closed for new submissions. But, I created a little JQuery Plugin as a Wrapper for the SMTPJS library with this;
(function ( $ ) {
$.getScript( “https://smtpjs.com/v2/smtp.js”, function( data, textStatus, jqxhr ) {
$.fn.Email = Email;
});
$.fn.Email = function() {
return “Not Loaded yet”;
};
}( jQuery ));
Which can be called as follows;
$.fn.Email.send(“from@you.com”,
“to@them.com”,
“Subject line”,
“Body in HTML”,
{
token: “GUID from SMTPJS.com”,
callback: function done(message) { alert(message) }
});
The GIT repo is here https://github.com/infiniteloopltd/SmtpJQuery/
Categories: Uncategorized
Comments (0)
Trackbacks (0)
Leave a comment
Trackback