Last active
April 26, 2023 19:57
-
-
Save kidGodzilla/bdd453129a1e30ac9d86b9fd7b412ca8 to your computer and use it in GitHub Desktop.
MailThis.to Ajax Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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/[email protected]', { | |
email: '[email protected]', | |
_subject: 'hi!', | |
message: 'Test' | |
}).then(function () { | |
location.href = 'https://mailthis.to/confirm' | |
}); |
Nikita244
commented
Dec 30, 2022
via email
Hi @Nikita244<https://github.com/Nikita244> you need to submit the form to mailthis.to else the form data will not get processed, and neither will you get the submission email. MailThis processes the form submission data and sends out the email so your form needs to submit the formdata to mailthis. Hope it helps!
Thanks a lot
Da: Ramit ***@***.***>
Inviato: venerdì 30 dicembre 2022 17:33
A: ***@***.***>
Cc: ***@***.***>
Oggetto: Re: kidGodzilla/mailthisto-ajax-example.js
@ramit-mitra commented on this gist.
Hi @Nikita244<https://github.com/Nikita244> you need to submit the form to mailthis.to else the form data will not get processed, and neither will you get the submission email. MailThis processes the form submission data and sends out the email so your form needs to submit the formdata to mailthis. Hope it helps!
—
Reply to this email directly, view it on GitHub<https://gist.github.com/bdd453129a1e30ac9d86b9fd7b412ca8#gistcomment-4418334> or unsubscribe<https://github.com/notifications/unsubscribe-auth/A3GHX7SNIEP3JTKOSQCYD5LWP4FDXBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVA3TGNZUGUYDMOFHORZGSZ3HMVZKMY3SMVQXIZI>.
You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
Can someone provide how does this work in angular
Can someone provide how does this work in angular
The example is pretty self explanatory. I remember having implemented in AngularJS years ago and it worked fine. So IMO the above should work fine for Angular & React. Hope it helps!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment