Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
MailThis.to Ajax Example
// The following example POSTS data to mailthis.to, redirects the user to a confirmation page, and then sends an email (upon the successful completion of Recaptcha verification)
$.post('https://mailthis.to/test@example.com', {
email: 'foo@bar.co',
_subject: 'hi!',
message: 'Test'
}).then(function () {
location.href = 'https://mailthis.to/confirm'
});
@availit

This comment has been minimized.

Show comment Hide comment
@availit

availit Apr 3, 2018

Is there any way you could add a feature that allows you to set the _after (redirect) url in a query string parameter for use with Ajax submissions?

For example: https://mailthis.to/confirm?after=https://myhomepage.net

availit commented Apr 3, 2018

Is there any way you could add a feature that allows you to set the _after (redirect) url in a query string parameter for use with Ajax submissions?

For example: https://mailthis.to/confirm?after=https://myhomepage.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment