Created
July 6, 2020 15:03
-
-
Save ozknozsrt/c8c55143fb48f3c53016472a5e7f941d to your computer and use it in GitHub Desktop.
Smtp JS
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
<!-- SmtpJs --> | |
<script src="https://smtpjs.com/v3/smtp.js"></script> | |
<script> | |
$('.btn-submit').click(function () { | |
/*var maillist = [ | |
'****@***.com', | |
'****@***.com', | |
];*/ | |
Email.send({ | |
SecureToken: "tokencode", | |
To: 'to@mail.com', | |
From: 'from@mail.com', | |
Subject: "Contact Form", | |
Body: 'Name: ' + $('#name').val() + '<br> Phone: ' + $('#phone').val() + '<br> Message: ' + $( | |
'#message').val() | |
}).then( | |
message => alert('Your form has been submitted successfully.') | |
); | |
return false; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment