-
-
Save kidGodzilla/bdd453129a1e30ac9d86b9fd7b412ca8 to your computer and use it in GitHub Desktop.
// 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' | |
}); |
export const SendMail = () => {
// $.post('https://mailthis.to/[email protected]',{
// email: '[email protected]',
// _subject: 'hi!',
// message: 'Test',
// file: './dgsl.png'
// }).then(function () {
// window.location.href = 'https://mailthis.to/confirm'
// });
$.ajax({
url: 'https://mailthis.to/ski******@gmail.com',
type: 'post',
data: {
email: '[email protected]',
_subject: 'hi!',
message: 'Test',
file: './dgsl.png'
},
headers: {
encType:'multipart/form-data',
},
dataType: 'json',
success: function (data) {
console.info(data);
}
});
};
Not sure if anyone is still working on this project, but the basic HTML form isn't redirecting people back to where they should go using the following input tag:
.... anyone else have this problem?
not even trying to do anything with JS.
hello
Can i change this? location.href = 'https://mailthis.to/confirm'
im working on angular and if i delete this code part, the email dosent arrived.
thanks a lot
Hi @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!
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!
How can i send a file using this?$.post cannot be used to send a file, so i need to use $ .ajax.
I learned that
What would the syntax be?