简体   繁体   中英

javascript & Form e-mail

I have following javascript for my form at the moment :

$('#myform').on('submit', function(e){
    e.preventDefault();
    $.get($(this).attr('action') + $(this).serialize());
    alert("Thank You! \nTop Up for: <?php echo "$username" ?> Purchased Successfully");
    location.reload();
});

I basically now want to make it so that it sends an email everytime the form is submitted to an fixed email adress. Basically everytime this script runs , it sshould send an email to stephan@test.com

Any ideas? I have no clue how to

You can use Mandrill and MailChimp (see here ) if you don't have an SMTP server, these are useful in letting you create your own email templates. If you have an SMTP, then you should write a PHP functionality to support email sending. There is plenty of articles in the subject, just use a search engine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM