Skip to content

Instantly share code, notes, and snippets.

Embed
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.

Copy link

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

@dharmyx

This comment has been minimized.

Copy link

commented May 14, 2019

@availit There won't be a need for redirection since this is AJAX based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.