0

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

Fabrício Matté
  • 69,329
  • 26
  • 129
  • 166
Stephan Botes
  • 87
  • 1
  • 2
  • 10

1 Answers1

0

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.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175